Skip to content

Commit

Permalink
Merge pull request #1033 from t-woerner/use_ipabackup_item_again
Browse files Browse the repository at this point in the history
ipabackup: Use ipabackup_item again in copy_backup_to_server
  • Loading branch information
rjeffman authored Jan 31, 2023
2 parents e96f92c + 3b4367c commit 0c23ae5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/ipabackup/tasks/copy_backup_to_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

- name: Set ipabackup_item
ansible.builtin.set_fact:
__derived_item:
ipabackup_item:
"{{ ipabackup_name | regex_search('.*_(ipa-.+)', '\\1') | first }}"
when: "'_ipa-' in ipabackup_name"

- name: Set ipabackup_item
ansible.builtin.set_fact:
__derived_item: "{{ ipabackup_name }}"
ipabackup_item: "{{ ipabackup_name }}"
when: "'_ipa-' not in ipabackup_name"

- name: Stat backup to copy
Expand All @@ -35,10 +35,10 @@
msg: "Unable to find backup {{ ipabackup_name }}"
when: result_backup_stat.stat.isdir is not defined

- name: Copy backup files to server for "{{ __derived_item }}"
- name: Copy backup files to server for "{{ ipabackup_item }}"
ansible.builtin.copy:
src: "{{ __derived_controller_dir }}/{{ ipabackup_name }}/"
dest: "{{ ipabackup_dir }}/{{ __derived_item }}"
dest: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
owner: root
group: root
mode: u=rw,go=r
Expand Down

0 comments on commit 0c23ae5

Please sign in to comment.