Clean up codestyle in conditionals
Based on some earlier review feedback, add defaults for copy_puppet and copy_hieradata so that we don't have to check if they are defined. Also, split the and condition in when to be a list of conditions. Change-Id: I68bd332bdfae6880b582203161798f709dc45a45
This commit is contained in:
parent
368cbb2ba6
commit
6260b48b9e
@ -54,7 +54,7 @@
|
||||
dest: "{{ manifest_base }}/hieradata"
|
||||
state: link
|
||||
|
||||
when: copy_hieradata is defined and copy_hieradata
|
||||
when: copy_hieradata
|
||||
|
||||
- block:
|
||||
- name: copy puppet modules
|
||||
@ -67,7 +67,9 @@
|
||||
src: /etc/puppet/modules
|
||||
dest: /etc/puppet
|
||||
|
||||
when: copy_puppet is defined and copy_puppet and manifest_base is defined
|
||||
when:
|
||||
- copy_puppet
|
||||
- manifest_base is defined
|
||||
|
||||
- name: run puppet
|
||||
puppet:
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
# vars file for ansible-puppet
|
||||
copy_hieradata: false
|
||||
copy_puppet: false
|
||||
hieradata: /etc/puppet/hieradata
|
||||
hieraenvironment: production
|
||||
|
Loading…
x
Reference in New Issue
Block a user