Ensure undercloud backup role runs with root privileges

The undercloud backup command requires root privileges to run,
as such we need to ensure become is available as a boolean option
to the operator. By default this value is set to true.

Change-Id: Idcbc28b107598efec62dd8f4afbb2d404a1a9c14
This commit is contained in:
Matthew N Heler 2021-02-07 16:13:26 -06:00
parent 14a601a47b
commit b12211cf51
4 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ None.
Role Variables
--------------
* `tripleo_undercloud_backup_become`: (Boolean) Run the command as root. This needs to be true as the commands require root privileges to run. Default: true
* `tripleo_undercloud_backup_add_path`: (List) List of additional filesystem paths to backup. Default: []
* `tripleo_undercloud_backup_debug`: (Boolean) Flag used to enable the debug version of commands. Default: false
* `tripleo_undercloud_backup_generate_scripts`: (Boolean) Write out a shell script that can be used to reproduce the command being executed. By default uses the value of `tripleo_generate_scripts` or False if `tripleo_generate_scripts` is not defined.

View File

@ -2,6 +2,7 @@
---
openstack_bin: openstack
tripleo_undercloud_backup_add_path: []
tripleo_undercloud_backup_become: true
tripleo_undercloud_backup_debug: false
tripleo_undercloud_backup_exclude_path: []
tripleo_undercloud_backup_generate_scripts: "{{ tripleo_generate_scripts | default(False) }}"

View File

@ -6,6 +6,7 @@
vars:
openstack_bin: echo
tripleo_os_cloud: undercloud
tripleo_undercloud_backup_become: false
tripleo_undercloud_backup_debug: true
tripleo_undercloud_backup_log_output: false
tripleo_undercloud_backup_log_combine: false

View File

@ -40,6 +40,7 @@
warn: false
async: "{{ tripleo_undercloud_backup_timeout }}"
poll: "{{ tripleo_undercloud_backup_poll }}"
become: "{{ tripleo_undercloud_backup_become }}"
register: tripleo_undercloud_backup_result
changed_when: true
when: