2014-08-17 00:35:57 +03:00
|
|
|
---
|
2018-04-25 18:00:56 +03:00
|
|
|
- name: Import OS-specific variables
|
|
|
|
include_vars: "vars/{{ ansible_distribution }}.yml"
|
|
|
|
tags: always
|
2014-08-17 00:35:57 +03:00
|
|
|
|
2017-10-03 15:02:38 +03:00
|
|
|
- name: Configure network time
|
|
|
|
import_tasks: ntp.yml
|
2016-06-27 10:30:11 +03:00
|
|
|
tags: ntp
|
|
|
|
|
2017-10-03 15:02:38 +03:00
|
|
|
- name: Install common packages
|
2018-04-25 18:46:28 +03:00
|
|
|
include_tasks: packages_Debian.yml
|
2017-11-05 01:51:49 +02:00
|
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
tags: packages
|
|
|
|
|
|
|
|
- name: Install common packages
|
2018-04-25 18:46:28 +03:00
|
|
|
include_tasks: packages_Ubuntu.yml
|
2017-11-05 01:51:49 +02:00
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2015-07-24 19:52:54 +03:00
|
|
|
tags: packages
|
|
|
|
|
2017-10-03 15:02:38 +03:00
|
|
|
- name: Configure firewall
|
2018-04-25 18:58:31 +03:00
|
|
|
include_tasks: firewall_Debian.yml
|
2017-11-05 01:51:49 +02:00
|
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
tags: firewall
|
|
|
|
|
|
|
|
- name: Configure firewall
|
2018-04-25 18:58:31 +03:00
|
|
|
include_tasks: firewall_Ubuntu.yml
|
2017-11-05 01:51:49 +02:00
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2015-03-15 17:33:48 +03:00
|
|
|
tags: firewall
|
2014-08-17 00:35:57 +03:00
|
|
|
|
2017-10-03 15:02:38 +03:00
|
|
|
- name: Configure secure shell daemon
|
|
|
|
import_tasks: sshd.yml
|
2015-01-20 16:28:06 +03:00
|
|
|
tags: sshd
|
|
|
|
|
2015-08-23 00:12:17 +03:00
|
|
|
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts!
|
2014-08-17 00:35:57 +03:00
|
|
|
- name: Reconfigure /etc/sysctl.conf
|
2015-08-23 00:12:17 +03:00
|
|
|
when: ansible_virtualization_role != 'host'
|
2014-08-17 00:35:57 +03:00
|
|
|
template: src=sysctl_{{ ansible_distribution }}.j2 dest=/etc/sysctl.conf owner=root group=root mode=0644
|
|
|
|
notify:
|
2015-03-15 17:31:29 +03:00
|
|
|
- reload sysctl
|
2014-08-17 00:35:57 +03:00
|
|
|
tags: sysctl
|
|
|
|
|
|
|
|
- name: Reconfigure /etc/rc.local
|
2020-11-06 15:44:57 +02:00
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('19.04', '<=')
|
2016-08-24 10:11:13 +03:00
|
|
|
template: src=rc.local_Ubuntu.j2 dest=/etc/rc.local owner=root group=root mode=0755
|
2014-08-17 00:35:57 +03:00
|
|
|
|
2015-03-15 17:52:05 +03:00
|
|
|
- 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
|
|
|
|
|
2017-10-03 15:02:38 +03:00
|
|
|
- name: Copy admin SSH keys
|
|
|
|
import_tasks: ssh-keys.yml
|
2014-10-11 12:13:45 +03:00
|
|
|
tags: ssh-keys
|
|
|
|
|
2014-08-17 00:35:57 +03:00
|
|
|
# vim: set sw=2 ts=2:
|