Resolve linting for install/collectd-generic.yml

Resolves linting issues:
* [ANSIBLE0013] Use shell only when shell functionality is required
* [ANSIBLE0009] Octal file permissions must contain leading zero

Executed via: ansible-lint ansible/install/collectd-generic.yml

Change-Id: Ie93d5813f91886bda83e162b73af9a515804bc48
This commit is contained in:
Leif Madsen 2016-08-30 15:20:46 -04:00
parent f657bbca44
commit af2492e285
No known key found for this signature in database
GPG Key ID: 409E6FD5A5D30321

View File

@ -18,7 +18,7 @@
dest=/etc/collectd.conf dest=/etc/collectd.conf
owner=root owner=root
group=root group=root
mode=0644 mode="0644"
become: true become: true
# #
@ -33,7 +33,7 @@
# This command is not always found? # This command is not always found?
- name: Set permissive for collectd - name: Set permissive for collectd
shell: semanage permissive -a collectd_t command: semanage permissive -a collectd_t
become: true become: true
when: collectd_permissive.rc != 0 when: collectd_permissive.rc != 0
ignore_errors: true ignore_errors: true
@ -47,18 +47,18 @@
dest=/root/custom-collectd.pp dest=/root/custom-collectd.pp
owner=root owner=root
group=root group=root
mode=644 mode="0644"
become: true become: true
- name: Check for collectd custom - name: Check for collectd custom
shell: semodule -l | grep -q custom-collectd command: semodule -l | grep -q custom-collectd
become: true become: true
register: collectd_custom register: collectd_custom
ignore_errors: true ignore_errors: true
changed_when: false changed_when: false
- name: Set custom policy for collectd - name: Set custom policy for collectd
shell: semodule -i /root/custom-collectd.pp command: semodule -i /root/custom-collectd.pp
become: true become: true
when: collectd_custom.rc != 0 when: collectd_custom.rc != 0