-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More cleanup for RHEL 6 -> 7 using leapp_upgrade_type custom.
- Loading branch information
1 parent
047c961
commit bfb6526
Showing
3 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
--- | ||
- name: disable-previous-repo-files | Backup repo files | ||
ansible.builtin.copy: | ||
remote_src: true | ||
src: "/etc/yum.repos.d/{{ item }}" | ||
dest: "/etc/yum.repos.d/{{ item }}.{{ ansible_date_time.iso8601_basic_short }}" | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
loop: "{{ __repo_files }}" | ||
- name: disable-previous-repo-files | Stat repo file | ||
ansible.builtin.stat: | ||
path: /etc/yum.repos.d/{{ item }} | ||
register: __repo_file_stat | ||
|
||
- name: disable-previous-repo-files | Remove repo files | ||
ansible.builtin.file: | ||
path: "/etc/yum.repos.d/{{ item }}" | ||
state: absent | ||
loop: "{{ __repo_files }}" | ||
- name: disable-previous-repo-files | Block to backup and remove repo file if found | ||
when: __repo_file_stat.stat.exists | ||
block: | ||
- name: disable-previous-repo-files | Backup repo files | ||
ansible.builtin.copy: | ||
remote_src: true | ||
src: /etc/yum.repos.d/{{ item }} | ||
dest: /etc/yum.repos.d/{{ item }}.{{ ansible_date_time.iso8601_basic_short }} | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
|
||
- name: disable-previous-repo-files | Remove repo files | ||
ansible.builtin.file: | ||
path: /etc/yum.repos.d/{{ item }} | ||
state: absent | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters