Adjust playbooks for Ansible 2.4 import changes

Ansible 2.4 changes the way includes work. Now you have to use "import"
for playbooks and tasks that are static, and "include" for those that
are dynamic (ie, those that use variables, loops, etc).

See: http://docs.ansible.com/ansible/devel/playbooks_reuse_includes.html
This commit is contained in:
2017-09-21 21:30:47 +03:00
parent 3e581f9a46
commit 16a9ebf97f
8 changed files with 16 additions and 16 deletions

View File

@ -3,16 +3,16 @@
# lineinfile: dest=/etc/hosts insertafter=^127.0.0.1 line='127.0.1.1 {{ inventory_hostname }}'
# tags: hostname
- include: ntp.yml
- import_tasks: ntp.yml
tags: ntp
- include: packages_{{ ansible_distribution }}.yml
- include_tasks: packages_{{ ansible_distribution }}.yml
tags: packages
- include: iptables_{{ ansible_distribution }}.yml
- include_tasks: iptables_{{ ansible_distribution }}.yml
tags: firewall
- include: sshd.yml
- import_tasks: sshd.yml
tags: sshd
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts!
@ -31,7 +31,7 @@
template: src=etc/udev/rules.d/60-scheduler.rules.j2 dest=/etc/udev/rules.d/60-scheduler.rules owner=root group=root mode=0644
tags: udev
- include: ssh-keys.yml
- import_tasks: ssh-keys.yml
tags: ssh-keys
# vim: set sw=2 ts=2:

View File

@ -20,9 +20,9 @@
- lrzip
- unzip
- include: cron-apt.yml
- import_tasks: cron-apt.yml
tags: cron-apt
- include: tarsnap.yml
- import_tasks: tarsnap.yml
# vim: set sw=2 ts=2:

View File

@ -43,9 +43,9 @@
- command-not-found-data
- python3-commandnotfound
- include: cron-apt.yml
- import_tasks: cron-apt.yml
tags: cron-apt
- include: tarsnap.yml
- import_tasks: tarsnap.yml
# vim: set sw=2 ts=2: