Allow setting puppet_version explicitly
If we set puppet_version as an inventory variable, then we can drive behavior from that variable, including updating puppet. Add the ability to set it here. A followup change in system-config will start setting it, but starting off it should be a no-op. Change-Id: I773ba3a2137b62ae2b3440dd02b3cdfb2099a62d
This commit is contained in:
parent
92d5d596b9
commit
745913a3c2
@ -25,11 +25,14 @@
|
||||
- name: Get puppet version
|
||||
shell:
|
||||
cmd: "PATH=$PATH:/opt/puppetlabs/bin puppet --version | cut -d '.' -f 1"
|
||||
register: puppet_version
|
||||
register: puppet_version_output
|
||||
when: puppet_version is not defined
|
||||
|
||||
- name: Set puppet version fact
|
||||
set_fact:
|
||||
puppet_version: "{{ puppet_version.stdout }}"
|
||||
puppet_version: "{{ puppet_version_output.stdout }}"
|
||||
when:
|
||||
- puppet_version is not defined
|
||||
|
||||
- name: Sanity check puppet version
|
||||
fail: "Unsupported puppet version {{ puppet_version }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user