Fix tripleo_hierdata permissions
Add become: true to the tasks that need to be able to write to /etc/ Change-Id: I24b118220ce2371f651cad6b8dfbbf5d031ee118 Related-Bug: #1883609
This commit is contained in:
parent
746bd9a52b
commit
c8d8e9adaf
@ -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 }}"
|
||||||
|
@ -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') }}"
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user