-
-
Save jdiez17/807dad36cc9a2cc3efcc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdiez@Hobgoblin:~/dev/ops/infrastructure/ansible$ ansible-playbook -i inventory/all bootstrap.yml --limit kylink-dev | |
PLAY [Install basic services] ************************************************** | |
TASK [setup] ******************************************************************* | |
ok: [kylink-dev] | |
TASK [common : Install services] *********************************************** | |
ok: [kylink-dev] => (item=elasticsearch) | |
ok: [kylink-dev] => (item=logstash) | |
ok: [kylink-dev] => (item=kibana) | |
ok: [kylink-dev] => (item=mongo) | |
ok: [kylink-dev] => (item=postgres) | |
TASK [common : Reload services] ************************************************ | |
fatal: [kylink-dev]: FAILED! => {"failed": true, "msg": "The conditional check '{{ item }}.changed' failed. The error was: error while evaluating conditional ({{ item }}.changed): 'elasticsearch' is undefined\n\nThe error appears to have been in '/home/jdiez/dev/ops/infrastructure/ansible/roles/common/tasks/main.yaml': line 36, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Reload services\n ^ here\n"} | |
NO MORE HOSTS LEFT ************************************************************* | |
to retry, use: --limit @bootstrap.retry | |
PLAY RECAP ********************************************************************* | |
kylink-dev : ok=3 changed=0 unreachable=0 failed=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: reload systemd | |
command: systemctl daemon-reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install services | |
copy: src={{ item }}.service dest=/etc/systemd/system | |
notify: reload systemd | |
register: "{{ item }}" | |
with_items: | |
- elasticsearch | |
- logstash | |
- kibana | |
- mongo | |
- postgres | |
- name: Reload systemd if needed | |
meta: flush_handlers | |
- name: Reload services | |
service: name={{ item }} state=restarted | |
when: "{{ item }}.changed" | |
with_items: | |
- elasticsearch | |
- logstash | |
- kibana | |
- mongo | |
- postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment