use separate role for package management

This commit is contained in:
Pim Kunis 2023-04-23 23:57:57 +02:00
parent 1c3b346099
commit 48d35b39c0
3 changed files with 8 additions and 13 deletions

View file

@ -6,20 +6,8 @@
- name: Install services - name: Install services
hosts: all hosts: all
pre_tasks:
- name: Update repositories
apt:
autoremove: true
upgrade: yes
state: latest
update_cache: yes
cache_valid_time: 86400 # One day
- name: Install packages
apt:
pkg:
- qemu-guest-agent
- dnsutils
roles: roles:
- {role: 'setup-apt', tags: 'setup-apt'}
- {role: 'dnsmasq', tags: 'dnsmasq'} - {role: 'dnsmasq', tags: 'dnsmasq'}
- {role: 'nsd', tags: 'nsd'} - {role: 'nsd', tags: 'nsd'}
- {role: 'ssh-ca', tags: 'ssh-ca'} - {role: 'ssh-ca', tags: 'ssh-ca'}

View file

@ -1,3 +1,7 @@
apt_install_packages:
- qemu-guest-agent
- dnsutils
ssh_ca_dir: /root/ssh_ca ssh_ca_dir: /root/ssh_ca
ssh_ca_user_ca_public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGKOClnK6/Hj8INjEgULY/lD2FM/nbiJHqaSXtEw4+Fj User Certificate Authority for DMZ" ssh_ca_user_ca_public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGKOClnK6/Hj8INjEgULY/lD2FM/nbiJHqaSXtEw4+Fj User Certificate Authority for DMZ"
ssh_ca_host_ca_public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x Host Certficate Authority for DMZ" ssh_ca_host_ca_public_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x Host Certficate Authority for DMZ"

View file

@ -1,3 +1,6 @@
- name: setup-apt
src: https://github.com/sunscrapers/ansible-role-apt.git
scm: git
- name: cloudinit-wait - name: cloudinit-wait
src: https://git.pim.kunis.nl/pim/ansible-role-cloudinit-wait src: https://git.pim.kunis.nl/pim/ansible-role-cloudinit-wait
scm: git scm: git