- fixed logic in handler which was causing build failures on centos9

- fixed handler name
- added .ansible-lint
This commit is contained in:
Chris Hammer 2023-12-12 13:21:31 -05:00
parent b3deb05555
commit 918b1f08be
3 changed files with 13 additions and 4 deletions

5
.ansible-lint Normal file
View File

@ -0,0 +1,5 @@
skip_list:
- yaml[colons]
- yaml[empty-lines]
- yaml[line-length]
- no-changed-when

View File

@ -1,7 +1,7 @@
--- ---
- name: restart snmpd - name: Restart_SNMPd
service: ansible.builtin.service:
name : snmpd name : snmpd
state: restarted state: restarted
when: when:
- ansible_virtualization_type | regex_search("docker|podman|container") - not ansible_virtualization_type | regex_search("docker|podman|container")

View File

@ -24,12 +24,16 @@
path: /etc/snmp path: /etc/snmp
state: directory state: directory
- name: Debug ansible_virtualization_type
ansible.builtin.debug:
var: ansible_virtualization_type
- name: Deploy snmpd.conf - name: Deploy snmpd.conf
template: template:
src: templates/snmpd_conf.j2 src: templates/snmpd_conf.j2
dest: "{{ __snmpd_conf_file }}" dest: "{{ __snmpd_conf_file }}"
mode: 0644 mode: 0644
notify: restart snmpd notify: Restart_SNMPd
rescue: rescue: