--- # tasks file for ensure_ansible_prereq - name: 'package states' ansible.builtin.package: name: '{{ item.name }}' state: '{{ item.state }}' loop: - name: 'acpid' state: 'present' - name: 'libselinux-python' state: 'present' - name: 'pyOpenSSL' state: 'present' - name: 'python-pyasn1' state: 'present' - name: 'python-urllib3' state: 'present' - name: 'python2-ndg_httpsclient' state: 'present' loop_control: label: '{{ item.name }} will be {{ item.state }}' notify: - 'ensure_ansible_prereq.package_facts' - 'ensure_ansible_prereq.service_facts' - name: 'service states' ansible.builtin.service: enabled: '{{ item.enabled }}' name: '{{ item.name }}' state: '{{ item.state }}' loop: - enabled: 'yes' name: 'acpid' state: 'started' loop_control: label: '{{ item.name }} will be {{ item.state }}' notify: - 'ensure_ansible_prereq.package_facts' - 'ensure_ansible_prereq.service_facts'