41 lines
809 B
YAML
41 lines
809 B
YAML
|
# vim: ft=yaml.ansible
|
||
|
---
|
||
|
- name: Set hostname
|
||
|
ansible.builtin.hostname:
|
||
|
name: "{{ hostname }}"
|
||
|
|
||
|
- name: Set timezone
|
||
|
community.general.timezone:
|
||
|
name: "{{ timezone }}"
|
||
|
|
||
|
- name: Upgrade system packages
|
||
|
ansible.builtin.apt:
|
||
|
update_cache: true
|
||
|
upgrade: full
|
||
|
|
||
|
- name: Install packages via apt
|
||
|
ansible.builtin.apt:
|
||
|
name: "{{ pkgs }}"
|
||
|
state: present
|
||
|
vars:
|
||
|
pkgs:
|
||
|
- apparmor
|
||
|
- curl
|
||
|
- git
|
||
|
- haveged
|
||
|
- needrestart
|
||
|
- python3-pip
|
||
|
- ufw
|
||
|
- unattended-upgrades
|
||
|
|
||
|
- name: Clone apt-update-push
|
||
|
ansible.builtin.git:
|
||
|
dest: /home/{{ ansible_user }}/apt-update-push
|
||
|
repo: https://github.com/samsapti/apt-update-push.git
|
||
|
clone: true
|
||
|
update: true
|
||
|
single_branch: true
|
||
|
depth: 1
|
||
|
become: false
|
||
|
notify: apt-update-push
|