40 lines
982 B
YAML
40 lines
982 B
YAML
---
|
|
- name: System preconfiguration
|
|
hosts: all
|
|
tasks:
|
|
- name: Prepare motd
|
|
template:
|
|
src: templates/motd.jinja
|
|
dest: /etc/motd
|
|
- name: Trusted ca
|
|
template:
|
|
src: templates/trusted-user-ca-keys.pem
|
|
dest: /etc/ssh/trusted-user-ca-keys.pem
|
|
- name: Configure sshd
|
|
template:
|
|
src: templates/sshd_config
|
|
dest: /etc/ssh/sshd_config
|
|
- name: Restart sshd service
|
|
systemd:
|
|
name: sshd
|
|
state: reloaded
|
|
|
|
- name: Upgrade system
|
|
hosts: all
|
|
tasks:
|
|
- name: Update apt-get repo and cache
|
|
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
|
- name: Upgrade all apt packages
|
|
apt: upgrade=dist force_apt_get=yes
|
|
- name: Remove dependencies that are no longer required
|
|
apt:
|
|
autoremove: yes
|
|
|
|
- name: Install my packages
|
|
hosts: all
|
|
tasks:
|
|
- name: Install main packages
|
|
apt:
|
|
name: "{{ main_packages }}"
|
|
state: present
|