diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 47457f9..ed44739 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -1,13 +1,14 @@ --- -- hosts: all +- name: Converge + hosts: all vars: - role_name: "{{ lookup('env','MOLECULE_PROJECT_DIRECTORY') | basename }}" + this_role: "{{ lookup('env','MOLECULE_PROJECT_DIRECTORY') | basename }}" manage_firewall: false # yamllint disable-line rule:line-length chrony_key: '1234 SHA256 HEX:DD4E59D2CAE16FFCEBF23D67201814A2FA63251E1B23A1AF3A99203121807C6C' tasks: - - name: "Include {{ role_name }}" + - name: "Include {{ this_role }}" ansible.builtin.include_role: - name: "{{ role_name }}" + name: "{{ this_role }}" ... diff --git a/requirements.txt b/requirements.txt index b305541..f1866da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pipx attrs>=19.2.0 rich==12.5.1 ansible==7.0.0 -ansible-lint==6.4.0 +ansible-lint==6.21.1 molecule==4.0.1 molecule-docker==2.0.0 molecule-vagrant-1.0.0 diff --git a/tasks/firewall.yml b/tasks/firewall.yml index 4564e84..73f3894 100644 --- a/tasks/firewall.yml +++ b/tasks/firewall.yml @@ -16,7 +16,7 @@ - ansible_os_family == 'Debian' - firewall_package == 'ufw' - net_allow|length > 0 - ufw: + community.general.ufw: rule: allow port: '123' proto: udp @@ -25,7 +25,7 @@ when: - ansible_os_family == 'RedHat' - net_allow|length > 0 - firewalld: + ansible.posix.firewalld: service: ntp immediate: true permanent: true diff --git a/tasks/main.yml b/tasks/main.yml index 60194c8..52ca1c2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,7 +17,7 @@ register: nettime_package ignore_errors: true -- name: manage firewall +- name: Manage firewall when: manage_firewall include_tasks: firewall.yml @@ -56,7 +56,7 @@ notify: Restart chronyd - name: Set timezone - timezone: + community.general.timezone: name: "{{ timezone | default('UTC') }}" notify: Restart chronyd