Skip to content
Snippets Groups Projects
Commit 959a87c9 authored by Arne Øslebø's avatar Arne Øslebø
Browse files

fixed problem with misp

parent fe59cfd5
Branches
Tags
No related merge requests found
...@@ -14,18 +14,24 @@ ...@@ -14,18 +14,24 @@
- name: Init default user - name: Init default user
shell: '/var/www/MISP/app/Console/cake user_init | /usr/bin/tail -n1' shell: '/var/www/MISP/app/Console/cake user_init | /usr/bin/tail -n1'
register: command_output register: init_output
ignore_errors: True ignore_errors: True
- name: Set API key fact
set_fact:
misp_api_key: "{{ init_output.stdout }}"
when: '"initialised" not in init_output.stdout'
- name: Get API key - name: Get API key
shell: '/var/www/MISP/app/Console/cake Admin getAuthkey admin@admin.test | /usr/bin/tail -n1' shell: '/var/www/MISP/app/Console/cake Admin getAuthkey admin@admin.test | /usr/bin/tail -n1'
register: command_output register: get_output
ignore_errors: True ignore_errors: True
when: '"initialised" in command_output.stdout' when: '"initialised" in init_output.stdout'
- name: Set API key fact - name: Set API key fact
set_fact: set_fact:
misp_api_key: "{{ command_output.stdout }}" misp_api_key: "{{ get_output.stdout }}"
when: '"initialised" in init_output.stdout'
- name: add users - name: add users
uri: uri:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment