Add puppet module sync to the role

If a host fails at copying the puppet, the host should likely not
run puppet.

Change-Id: I22b7a21778d514a0a1ab04a76f03fdc9c58a05b3
This commit is contained in:
Monty Taylor 2015-11-30 17:26:34 -06:00
parent 5155e7c3a1
commit b53fca3ab7

View File

@ -52,6 +52,25 @@
- hiera_file_paths.paths_dict.paths - hiera_file_paths.paths_dict.paths
- st.results - st.results
- name: copy puppet modules
synchronize:
src: "{{ manifest_base }}/{{ hieraenvironment }}"
dest: "{{ manifest_base }}"
when: copy_puppet is defined and copy_puppet and manifest_base is defined
- name: copy system puppet modules
synchronize:
src: /etc/puppet/modules
dest: /etc/puppet
when: copy_puppet is defined and copy_puppet and manifest_base is defined
- name: ensure hieradata manifest link is present
file:
src: "{{ hieradata }}"
dest: "{{ manifest_base }}/hieradata"
state: link
when: copy_hieradata is defined and copy_hieradata
- name: run puppet - name: run puppet
puppet: puppet:
puppetmaster: "{{ puppetmaster|default(omit) }}" puppetmaster: "{{ puppetmaster|default(omit) }}"