bnr Add folder marker to avoid overwrote

Add a specific marker (directory name) to the blockinfile to avoid
deletion for any updates of the execution.

Currently, to configure the ironic integration backup. There is a
need of a backup data server (nfs) and the ironic PXE boot files
on the undercloud. If the backup data server is going to be on the
undercloud. We basically execute twice the nfs server configuration
with the data backup directory and the ironic configuration. The
way that we configure the nfs server, the blockinfile is overwritten.
So only the last configuration remains.

This patch aims to modify the blockinfile only when the directory
matches. For two different directories, it will create two
blockinfile blocks.

Change-Id: Ia30f4f27ee1a9cdd604d3c63d2d135fc471adc76
This commit is contained in:
Juan Badia Payno 2021-11-04 18:47:15 +01:00
parent 55b47ddc36
commit 2f231ee71b

View File

@ -133,6 +133,7 @@
path: /etc/exports
block: "{{bar_exportfs_lines}}"
backup: true
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ tripleo_backup_and_restore_shared_storage_folder }}"
tags:
- bar_setup_nfs_server