ansible-ffibk/roles/server-basic/tasks/main.yml

128 lines
2.6 KiB
YAML
Raw Permalink Normal View History

---
- 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
2017-11-12 12:44:20 +01:00
- 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: copy resolvconf if-up
copy:
src: resolvconf.if-up
dest: /etc/network/if-up.d/000resolvconf
owner: root
group: root
mode: 0755
- name: copy resolvconf if-down
copy:
src: resolvconf.if-down
dest: /etc/network/if-down.d/resolvconf
owner: root
group: root
mode: 0755
- 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: configure bonding module options
template:
src: modprobe_bond.conf.j2
dest: /etc/modprobe.d/bond.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