Merge "Fix tripleo_hierdata permissions" into stable/train

This commit is contained in:
Zuul 2020-07-07 19:53:04 +00:00 committed by Gerrit Code Review
commit 0e712d5c98
3 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
--- ---
- name: Check for hieradata file - name: Check for hieradata file
become: true
stat: stat:
path: path:
src: "{{ hieradata_ansible_file }}" src: "{{ hieradata_ansible_file }}"

View File

@ -15,11 +15,13 @@
# under the License. # under the License.
- name: Copy overcloud.json to all_nodes.json - name: Copy overcloud.json to all_nodes.json
become: true
copy: copy:
src: "{{ playbook_dir }}/group_vars/overcloud.json" src: "{{ playbook_dir }}/group_vars/overcloud.json"
dest: "{{ dest_path | default('/etc/puppet/hieradata/all_nodes.json') }}" dest: "{{ dest_path | default('/etc/puppet/hieradata/all_nodes.json') }}"
- name: Render hieradata from template - name: Render hieradata from template
become: true
template: template:
src: templates/{{ item }}.j2 src: templates/{{ item }}.j2
dest: "{{ dest_path | default('/etc/puppet/hieradata/' ~ item ~ '.json') }}" dest: "{{ dest_path | default('/etc/puppet/hieradata/' ~ item ~ '.json') }}"

View File

@ -15,12 +15,14 @@
# under the License. # under the License.
- name: Create /etc/puppet/hieradata - name: Create /etc/puppet/hieradata
become: true
file: file:
path: /etc/puppet/hieradata path: /etc/puppet/hieradata
state: directory state: directory
mode: 0700 mode: 0700
- name: Write hiera config - name: Write hiera config
become: true
when: when:
- (hieradata_files | length) > 0 - (hieradata_files | length) > 0
copy: copy: