All tasks now use FQCN

This commit is contained in:
Jason Rothstein 2020-11-29 17:53:24 -06:00
parent 008d73322d
commit 7df7ca764e
5 changed files with 22 additions and 10 deletions

View File

@ -30,7 +30,7 @@ Including an example of how to use your role (for instance, with variables passe
License License
------- -------
BSD LGPL-3.0-or-later
Author Information Author Information
------------------ ------------------

View File

@ -1,2 +1,6 @@
--- ---
# handlers file for ensure_ansible_prereq # handlers file for ensure_ansible_prereq
- name: 'ensure_ansible_prereq.package_facts'
ansible.builtin.package_facts:
- name: 'ensure_ansible_prereq.service_facts'
ansible.builtin.service_facts:

View File

@ -1,11 +1,11 @@
--- ---
# tasks file for ensure_ansible_prereq # tasks file for ensure_ansible_prereq
- name: 'repository changes' - name: 'repository changes'
apt_repository: ansible.builtin.apt_repository:
repo: 'deb cdrom:*' repo: 'deb cdrom:*'
state: absent state: absent
- name: 'package states' - name: 'package states'
package: ansible.builtin.package:
name: '{{ item.name }}' name: '{{ item.name }}'
state: '{{ item.state }}' state: '{{ item.state }}'
loop: loop:
@ -15,4 +15,6 @@
state: 'present' state: 'present'
loop_control: loop_control:
label: '{{ item.name }} will be {{ item.state }}' label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_ansible_prereq.package_facts'
- 'ensure_ansible_prereq.service_facts'

View File

@ -1,7 +1,7 @@
--- ---
# tasks file for ensure_ansible_prereq # tasks file for ensure_ansible_prereq
- name: 'package states' - name: 'package states'
package: ansible.builtin.package:
name: '{{ item.name }}' name: '{{ item.name }}'
state: '{{ item.state }}' state: '{{ item.state }}'
loop: loop:
@ -9,8 +9,11 @@
state: 'present' state: 'present'
loop_control: loop_control:
label: '{{ item.name }} will be {{ item.state }}' label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_ansible_prereq.package_facts'
- 'ensure_ansible_prereq.service_facts'
- name: 'service states' - name: 'service states'
service: ansible.builtin.service:
enabled: '{{ item.enabled }}' enabled: '{{ item.enabled }}'
name: '{{ item.name }}' name: '{{ item.name }}'
state: '{{ item.state }}' state: '{{ item.state }}'
@ -20,4 +23,6 @@
state: 'started' state: 'started'
loop_control: loop_control:
label: '{{ item.name }} will be {{ item.state }}' label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_ansible_prereq.package_facts'
- 'ensure_ansible_prereq.service_facts'

View File

@ -3,7 +3,7 @@
- name: 'include variables' - name: 'include variables'
when: when:
- ansible_system == 'Linux' - ansible_system == 'Linux'
include_tasks: ansible.builtin.include_tasks:
file: '{{ lookup("first_found", findme ) }}' file: '{{ lookup("first_found", findme ) }}'
vars: vars:
findme: findme:
@ -16,4 +16,5 @@
- '{{ ansible_os_family }}-default.yml' - '{{ ansible_os_family }}-default.yml'
- 'default.yml' - 'default.yml'
errors: 'ignore' errors: 'ignore'
- name: 'flush handlers'
ansible.builtin.meta: 'flush_handlers'