Use common package install via variables rather than hard code the task

This commit is contained in:
2020-12-05 23:23:46 -06:00
parent 9e8e9c8cc6
commit 160ab64917
13 changed files with 124 additions and 91 deletions

View File

@@ -3,18 +3,5 @@
- name: 'repository changes'
ansible.builtin.apt_repository:
repo: 'deb cdrom:*'
state: absent
- name: 'package states'
ansible.builtin.package:
name: '{{ item.name }}'
state: '{{ item.state }}'
loop:
- name: 'python-apt'
state: 'present'
- name: 'sudo'
state: 'present'
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_ansible_prereq.package_facts'
- 'ensure_ansible_prereq.service_facts'
state: 'absent'