ansible-personal/roles/common/tasks/main.yml
Alan Orth 7b60e6d24f
Revert "Import OS-specific vars in tasks instead of play"
This reverts commit e30e4d4b1e.

I suspect this was a side effect of using Python 3 rather than an
issue in Ansible 2.4.0.0.
2017-11-04 23:53:38 +02:00

40 lines
1.1 KiB
YAML

---
- name: Configure network time
import_tasks: ntp.yml
tags: ntp
- name: Install common packages
include_tasks: packages_{{ ansible_distribution }}.yml
tags: packages
- name: Configure firewall
include_tasks: firewall_{{ ansible_distribution }}.yml
tags: firewall
- name: Configure secure shell daemon
import_tasks: sshd.yml
tags: sshd
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts!
- name: Reconfigure /etc/sysctl.conf
when: ansible_virtualization_role != 'host'
template: src=sysctl_{{ ansible_distribution }}.j2 dest=/etc/sysctl.conf owner=root group=root mode=0644
notify:
- reload sysctl
tags: sysctl
- name: Reconfigure /etc/rc.local
when: ansible_distribution == 'Ubuntu'
template: src=rc.local_Ubuntu.j2 dest=/etc/rc.local owner=root group=root mode=0755
- name: Set I/O scheduler
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
- name: Copy admin SSH keys
import_tasks: ssh-keys.yml
tags: ssh-keys
# vim: set sw=2 ts=2: