2014-08-16 23:35:57 +02:00
|
|
|
---
|
|
|
|
#- name: Add hostname to /etc/hosts
|
|
|
|
# lineinfile: dest=/etc/hosts insertafter=^127.0.0.1 line='127.0.1.1 {{ inventory_hostname }}'
|
|
|
|
# tags: hostname
|
|
|
|
|
2016-06-27 09:30:11 +02:00
|
|
|
- name: Set timezone
|
|
|
|
when: timezone is defined
|
|
|
|
command: /usr/bin/timedatectl set-timezone {{ timezone }}
|
|
|
|
tags: timezone
|
|
|
|
|
|
|
|
- name: Enable NTP
|
2016-08-22 11:49:00 +02:00
|
|
|
service: name=systemd-timesyncd enabled=yes
|
2016-06-27 09:30:11 +02:00
|
|
|
tags: ntp
|
|
|
|
|
2016-08-22 15:34:05 +02:00
|
|
|
- include: packages_{{ ansible_distribution }}.yml
|
2015-07-24 18:52:54 +02:00
|
|
|
tags: packages
|
|
|
|
|
2016-08-22 15:34:05 +02:00
|
|
|
- include: iptables_{{ ansible_distribution }}.yml
|
2015-03-15 15:33:48 +01:00
|
|
|
tags: firewall
|
2014-08-16 23:35:57 +02:00
|
|
|
|
2015-08-22 23:00:43 +02:00
|
|
|
- include: sshd.yml
|
2015-01-20 14:28:06 +01:00
|
|
|
tags: sshd
|
|
|
|
|
2015-08-22 23:12:17 +02:00
|
|
|
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts!
|
2014-08-16 23:35:57 +02:00
|
|
|
- name: Reconfigure /etc/sysctl.conf
|
2015-08-22 23:12:17 +02:00
|
|
|
when: ansible_virtualization_role != 'host'
|
2014-08-16 23:35:57 +02:00
|
|
|
template: src=sysctl_{{ ansible_distribution }}.j2 dest=/etc/sysctl.conf owner=root group=root mode=0644
|
|
|
|
notify:
|
2015-03-15 15:31:29 +01:00
|
|
|
- reload sysctl
|
2014-08-16 23:35:57 +02:00
|
|
|
tags: sysctl
|
|
|
|
|
|
|
|
- name: Reconfigure /etc/rc.local
|
2015-03-15 15:43:21 +01:00
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2016-08-24 09:11:13 +02:00
|
|
|
template: src=rc.local_Ubuntu.j2 dest=/etc/rc.local owner=root group=root mode=0755
|
2014-08-16 23:35:57 +02:00
|
|
|
|
2015-03-15 15:52:05 +01: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
|
|
|
|
|
2014-10-11 11:13:45 +02:00
|
|
|
- include: ssh-keys.yml
|
|
|
|
tags: ssh-keys
|
|
|
|
|
2014-08-16 23:35:57 +02:00
|
|
|
# vim: set sw=2 ts=2:
|