ansible-ffibk/roles/server-basic/tasks/main.yml
2018-09-18 14:27:58 +02:00

103 lines
2.2 KiB
YAML

---
- name: configure debian apt repositories
template:
src: apt-sources-list.j2
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
- name: update package information
apt:
update_cache: yes
- name: ensure rpcbind is not installed
package:
name: rpcbind
state: absent
- name: ensure common packages are installed
package:
name: "{{ packages }}"
state: present
- name: ensure vim is default editor
alternatives:
name: editor
path: /usr/bin/vim.basic
- name: ensure default locale is installed
locale_gen:
name: "{{ default_locale }}"
state: present
- name: ensure default locale is set
command: "/usr/bin/localectl set-locale LANG={{ default_locale }}"
changed_when: false
- name: set timezone to Europe/Berlin
timezone:
name: Europe/Berlin
- name: create ffmwu custom config dir
file:
path: /home/admin/.ffmwu-config
state: directory
owner: admin
group: admin
mode: 0750
- name: configure dummy module to load on system boot
template:
src: modules_load_dummy.conf.j2
dest: /etc/modules-load.d/dummy.conf
owner: root
group: root
mode: 0644
- name: configure dummy module options
template:
src: modprobe_dummy.conf.j2
dest: /etc/modprobe.d/dummy.conf
owner: root
group: root
mode: 0644
- name: load dummy module
modprobe:
name: "dummy"
state: present
- name: manage apt auto upgrades
template:
src: apt-20auto-upgrades.j2
dest: /etc/apt/apt.conf.d/20auto-upgrades
mode: 0644
owner: root
group: root
- name: manage apt unattended upgrades
template:
src: apt-50unattended-upgrades.j2
dest: /etc/apt/apt.conf.d/50unattended-upgrades
mode: 0644
owner: root
group: root
- name: create systemd override dir for networking.service
file:
path: /etc/systemd/system/networking.service.d
state: directory
owner: root
group: root
mode: 0755
- name: configure systemd unit overrides
template:
src: networking_service_overrides.j2
dest: /etc/systemd/system/networking.service.d/override.conf
owner: root
group: root
mode: 0644
notify:
- reload systemd