From b53fca3ab7dd16a4df8798b795ccf82ecd2d6c79 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 30 Nov 2015 17:26:34 -0600 Subject: [PATCH] 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 --- tasks/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index dd9634a..c7f7ea7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -52,6 +52,25 @@ - hiera_file_paths.paths_dict.paths - 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 puppet: puppetmaster: "{{ puppetmaster|default(omit) }}"