Skip to content

Fixes ansible-lint issues (6.21.1) #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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