Browse Source

Add some missing /'s and +'s to fix hieradata pathing

These were missed when the puppet4 support was added.

Change-Id: I7f7153093aaf46d5bbdb620228cf1c7fce3650e1
master
Clark Boylan 1 year ago
parent
commit
c95f026c14
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      tasks/main.yml

+ 4
- 4
tasks/main.yml View File

@@ -29,17 +29,17 @@
29 29
 - block:
30 30
   - name: Set management server hieradata var
31 31
     set_fact:
32
-      mgmt_hieradata: "{{ '/etc/puppet/hieradata' + puppet_environment if mgmt_puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
32
+      mgmt_hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if mgmt_puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
33 33
     delegate_to: localhost
34 34
 
35 35
   - name: Set hieradata var
36 36
     set_fact:
37
-      hieradata: "{{ '/etc/puppet/hieradata' + puppet_environment if puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
37
+      hieradata: "{{ '/etc/puppet/hieradata/' + puppet_environment if puppet_version == '3' else '/etc/puppetlabs/code/environments/' + puppet_environment + '/hieradata' }}"
38 38
 
39 39
   - name: ensure hiera directory
40 40
     file:
41 41
       state: directory
42
-      path: "{{ hieradata }}//{{ item }}"
42
+      path: "{{ hieradata }}/{{ item }}"
43 43
       owner: root
44 44
       group: root
45 45
       mode: 0700
@@ -58,7 +58,7 @@
58 58
   - name: copy hiera files
59 59
     copy:
60 60
       src: "{{ mgmt_hieradata + '/' + item }}"
61
-      dest: "{{ hieradata + '/' item }}"
61
+      dest: "{{ hieradata + '/' + item }}"
62 62
       mode: 0600
63 63
     with_items: "{{ hiera_file_paths.paths|default() }}"
64 64
 

Loading…
Cancel
Save