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
|
# Below are all categories currently available. Just as with
|
||||||
# the platforms above, uncomment those that apply to your role.
|
# the platforms above, uncomment those that apply to your role.
|
||||||
#
|
#
|
||||||
categories:
|
galaxy_tags:
|
||||||
#- cloud
|
#- cloud
|
||||||
#- cloud:ec2
|
#- cloud:ec2
|
||||||
#- cloud:gce
|
#- cloud:gce
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
puppet_environmentpath: '$confdir/environments'
|
puppet_environmentpath: '$confdir/environments'
|
||||||
when:
|
when:
|
||||||
- puppet_version == '3'
|
- puppet_version == '3'
|
||||||
- puppet_environmentpath == ''
|
- not puppet_environmentpath
|
||||||
|
|
||||||
# Create our config
|
# Create our config
|
||||||
- name: Create puppet.conf from template
|
- name: Create puppet.conf from template
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
- name: Set management server hieradata var
|
- name: Set management server hieradata var
|
||||||
set_fact:
|
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
|
when: mgmt_hieradata is not defined
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
- name: Set hieradata var
|
- name: Set hieradata var
|
||||||
set_fact:
|
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
|
- name: ensure hiera directory
|
||||||
file:
|
file:
|
||||||
@ -95,7 +95,7 @@
|
|||||||
- name: Set management server puppet module dir to user-defined path
|
- name: Set management server puppet module dir to user-defined path
|
||||||
set_fact:
|
set_fact:
|
||||||
mgmt_puppet_module_dir: "{{ puppet_basemodulepath }}"
|
mgmt_puppet_module_dir: "{{ puppet_basemodulepath }}"
|
||||||
when: puppet_basemodulepath != ''
|
when: puppet_basemodulepath
|
||||||
|
|
||||||
- name: Set management server puppet module dir
|
- name: Set management server puppet module dir
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -106,7 +106,7 @@
|
|||||||
- name: Set puppet module dir to user-defined path
|
- name: Set puppet module dir to user-defined path
|
||||||
set_fact:
|
set_fact:
|
||||||
puppet_module_dir: "{{ puppet_basemodulepath }}"
|
puppet_module_dir: "{{ puppet_basemodulepath }}"
|
||||||
when: puppet_basemodulepath != ''
|
when: puppet_basemodulepath
|
||||||
|
|
||||||
- name: Set puppet module dir
|
- name: Set puppet module dir
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -147,7 +147,7 @@
|
|||||||
- name: find logs
|
- name: find logs
|
||||||
shell: "ls -tr /var/lib/puppet/reports/{{ ansible_fqdn }}/*_puppetdb.json"
|
shell: "ls -tr /var/lib/puppet/reports/{{ ansible_fqdn }}/*_puppetdb.json"
|
||||||
register: files
|
register: files
|
||||||
failed_when: files.stdout_lines|default("") == ""
|
failed_when: not files.stdout_lines|default("")
|
||||||
|
|
||||||
- name: set log filename
|
- name: set log filename
|
||||||
set_fact: puppet_logfile="{{ files.stdout_lines|sort|last }}"
|
set_fact: puppet_logfile="{{ files.stdout_lines|sort|last }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user