The repository name differs from the galaxy name. Although not strictly necessary, makes origin of role more clear in code and would allow easier switching between galaxy, and git. Using the namespaced name makes it clear it's an external role. Same name as in role documentation now. No change in actual role or version of role. Link: https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-a-file
46 lines
1 KiB
YAML
46 lines
1 KiB
YAML
---
|
|
# tasks for all hosts
|
|
|
|
- hosts: all
|
|
become: true
|
|
|
|
vars:
|
|
ansible_python_interpreter: /usr/bin/python3
|
|
|
|
roles:
|
|
- role: adriagalin.timezone
|
|
vars:
|
|
ag_timezone: "{{ timezone }}"
|
|
- role: users
|
|
|
|
tasks:
|
|
- name: Update and clean package cache
|
|
apt:
|
|
update_cache: true
|
|
cache_valid_time: 3600
|
|
autoclean: true
|
|
changed_when: false
|
|
|
|
- name: Ensure unattended-upgrades is installed and up to date
|
|
apt:
|
|
name: unattended-upgrades
|
|
state: present
|
|
|
|
- name: Setup unattended-upgrades
|
|
include_role:
|
|
name: hifis.unattended_upgrades
|
|
vars:
|
|
unattended_origins_patterns:
|
|
- "origin=*"
|
|
unattended_package_blacklist: [cowsay]
|
|
unattended_mail: "root"
|
|
unattended_mail_only_on_error: true
|
|
unattended_syslog_enable: true
|
|
|
|
- name: Install some common software packages
|
|
ansible.builtin.apt:
|
|
state: present
|
|
name:
|
|
- molly-guard
|
|
- mc
|
|
- bsd-mailx
|