Add delete to synchronize
Since I53cb63ffa4ae50575d4fa37b24323ad13ec1bac3 some puppet runs are failing because system-config:playbooks/roles/set-hostname moved to roles/set-hostname and became a symlink. rsync refuses to overwrite the directory with a symlink because it seems to not be empty, because we never removed the files in it. Handle the possibility of things moving around like this by specifying delete so old files are cleared out. Finally set manifest_base dir ownership and mode to address linter E208. Depends-On: https://review.opendev.org/762181 Change-Id: I249d713214d8383a3ccfe1a400404cbdcb97dcc6
This commit is contained in:
parent
eafdbf9593
commit
e5e1127122
@ -77,12 +77,16 @@
|
||||
- name: Ensure target directory exists
|
||||
file:
|
||||
path: "{{ manifest_base }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
state: directory
|
||||
|
||||
- name: copy puppet modules
|
||||
synchronize:
|
||||
src: "{{ mgmt_manifestpath }}"
|
||||
dest: "{{ manifest_base }}"
|
||||
delete: yes
|
||||
no_log: "{{ puppet_nolog_sync | bool }}"
|
||||
|
||||
- name: ensure hieradata manifest link is present
|
||||
@ -117,6 +121,7 @@
|
||||
synchronize:
|
||||
src: "{{ mgmt_puppet_module_dir }}"
|
||||
dest: "{{ puppet_module_dir }}"
|
||||
delete: yes
|
||||
no_log: "{{ puppet_nolog_sync | bool }}"
|
||||
|
||||
when:
|
||||
|
Loading…
x
Reference in New Issue
Block a user