Skip to content

Commit

Permalink
Fixes ansible-lint issues (6.21.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaassssiiee committed Oct 24, 2023
1 parent 09f239d commit d3cb7d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
...
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tasks/firewall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,7 +25,7 @@
when:
- ansible_os_family == 'RedHat'
- net_allow|length > 0
firewalld:
ansible.posix.firewalld:
service: ntp
immediate: true
permanent: true
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
register: nettime_package
ignore_errors: true

- name: manage firewall
- name: Manage firewall
when: manage_firewall
include_tasks: firewall.yml

Expand Down Expand Up @@ -56,7 +56,7 @@
notify: Restart chronyd

- name: Set timezone
timezone:
community.general.timezone:
name: "{{ timezone | default('UTC') }}"
notify: Restart chronyd

Expand Down

0 comments on commit d3cb7d7

Please sign in to comment.