Merge "Optimized Restore for pam_group configuration"

This commit is contained in:
Zuul 2024-08-16 15:51:20 +00:00 committed by Gerrit Code Review
commit d9d7e0b4b9
2 changed files with 8 additions and 2 deletions

View File

@ -46,6 +46,8 @@ restore_items:
- opt/platform
- opt/extension
restore_extra_items: []
restore_exclude_items:
- etc/ssl/certs/ssl-cert-snakeoil.pem
- etc/ssl/private/ssl-cert-snakeoil.key

View File

@ -1,6 +1,6 @@
---
#
# Copyright (c) 2022-2023 Wind River Systems, Inc.
# Copyright (c) 2022-2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -19,10 +19,14 @@
when: upgrade_in_progress
- name: Add extra items to restore
set_fact:
full_restore_items: "{{ restore_items + restore_extra_items }}"
- name: Restore configuration files
command: >-
tar --use-compress-program=pigz -C / -xvpf {{ platform_backup_fqpn }} --overwrite
{{ ' '.join(restore_items) }}
{{ ' '.join(full_restore_items) }}
{% for v in restore_exclude_items %}
--exclude {{ v | quote }}
{% endfor %}