Fix ansible-lint
The current tests never fail, change ansible-lint invocation so that it fails - and fix problems. Change-Id: I6aeb1e3a4c28af71a858ec83c21f4dbb5e7ef97f
This commit is contained in:
parent
e42e0856b5
commit
7a9fd23801
@ -105,7 +105,7 @@ galaxy_info:
|
||||
# Below are all categories currently available. Just as with
|
||||
# the platforms above, uncomment those that apply to your role.
|
||||
#
|
||||
categories:
|
||||
galaxy_tags:
|
||||
#- cloud
|
||||
#- cloud:ec2
|
||||
#- cloud:gce
|
||||
|
@ -11,7 +11,7 @@
|
||||
puppet_environmentpath: '$confdir/environments'
|
||||
when:
|
||||
- puppet_version == '3'
|
||||
- puppet_environmentpath == ''
|
||||
- not puppet_environmentpath
|
||||
|
||||
# Create our config
|
||||
- name: Create puppet.conf from template
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
- name: Set management server hieradata var
|
||||
set_fact:
|
||||
mgmt_hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if mgmt_puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
|
||||
mgmt_hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if mgmt_puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}" # noqa 204
|
||||
|
||||
when: mgmt_hieradata is not defined
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
- name: Set hieradata var
|
||||
set_fact:
|
||||
hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
|
||||
hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}" # noqa 204
|
||||
|
||||
- name: ensure hiera directory
|
||||
file:
|
||||
@ -95,7 +95,7 @@
|
||||
- name: Set management server puppet module dir to user-defined path
|
||||
set_fact:
|
||||
mgmt_puppet_module_dir: "{{ puppet_basemodulepath }}"
|
||||
when: puppet_basemodulepath != ''
|
||||
when: puppet_basemodulepath
|
||||
|
||||
- name: Set management server puppet module dir
|
||||
set_fact:
|
||||
@ -106,7 +106,7 @@
|
||||
- name: Set puppet module dir to user-defined path
|
||||
set_fact:
|
||||
puppet_module_dir: "{{ puppet_basemodulepath }}"
|
||||
when: puppet_basemodulepath != ''
|
||||
when: puppet_basemodulepath
|
||||
|
||||
- name: Set puppet module dir
|
||||
set_fact:
|
||||
@ -147,7 +147,7 @@
|
||||
- name: find logs
|
||||
shell: "ls -tr /var/lib/puppet/reports/{{ ansible_fqdn }}/*_puppetdb.json"
|
||||
register: files
|
||||
failed_when: files.stdout_lines|default("") == ""
|
||||
failed_when: not files.stdout_lines|default("")
|
||||
|
||||
- name: set log filename
|
||||
set_fact: puppet_logfile="{{ files.stdout_lines|sort|last }}"
|
||||
|
Loading…
Reference in New Issue
Block a user