- 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
service:
- name: Restart_SNMPd
ansible.builtin.service:
name : snmpd
state: restarted
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
state: directory
- name: Debug ansible_virtualization_type
ansible.builtin.debug:
var: ansible_virtualization_type
- name: Deploy snmpd.conf
template:
src: templates/snmpd_conf.j2
dest: "{{ __snmpd_conf_file }}"
mode: 0644
notify: restart snmpd
notify: Restart_SNMPd
rescue: