when making a new playbook always make sure you give the hosts the correct name. ansible will just keep running and will say it completed everything even if nothing got done.

This commit is contained in:
Stephen Smoogen 2019-05-10 18:19:04 +00:00
parent 179a661add
commit 7778e014f0

View file

@ -2,7 +2,7 @@
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=grobisplitter"
- name: make the box be real
hosts: nagios
hosts: grobisplitter
user: root
gather_facts: True
@ -30,3 +30,22 @@
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up packages
hosts: grobisplitter
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: install needed packages
package: name={{ item }} state=present
with_items:
- rsync
- net-tools
- libmodulemd