2014-08-16 23:35:57 +02:00
|
|
|
---
|
|
|
|
# not needed on OpenStack images...
|
|
|
|
#- name: Set hostname
|
|
|
|
# hostname: name={{ inventory_hostname }}
|
|
|
|
# tags: hostname
|
|
|
|
#
|
|
|
|
#- 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
|
|
|
|
command: /usr/bin/timedatectl set-ntp on
|
|
|
|
tags: ntp
|
|
|
|
|
2014-08-16 23:35:57 +02:00
|
|
|
- include: packages_Ubuntu.yml
|
2015-03-15 15:29:41 +01:00
|
|
|
when: ansible_distribution == 'Ubuntu'
|
2014-08-16 23:35:57 +02:00
|
|
|
tags: packages
|
|
|
|
|
2015-07-24 18:52:54 +02:00
|
|
|
- include: packages_Debian.yml
|
|
|
|
when: ansible_distribution == 'Debian'
|
|
|
|
tags: packages
|
|
|
|
|
2015-08-23 11:06:25 +02:00
|
|
|
- include: iptables_Ubuntu.yml
|
|
|
|
when: ansible_distribution == 'Ubuntu'
|
|
|
|
tags: firewall
|
|
|
|
|
2014-08-16 23:35:57 +02:00
|
|
|
- include: iptables_Debian.yml
|
2015-08-23 11:06:25 +02:00
|
|
|
when: ansible_distribution == 'Debian'
|
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'
|
2014-08-16 23:35:57 +02:00
|
|
|
template: src=rc.local_{{ ansible_distribution }}.j2 dest=/etc/rc.local owner=root group=root mode=0755
|
|
|
|
|
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:
|