Skip to content

Commit

Permalink
Merge pull request #5 from solumath/main
Browse files Browse the repository at this point in the history
Remove C2R after upgrade
  • Loading branch information
andywaltlova authored Nov 21, 2023
2 parents 1d6eb81 + 9e6625b commit 03a5938
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@
- name: Install Convert2RHEL
ansible.builtin.yum:
name: convert2rhel

- name: Remove Convert2RHEL
ansible.builtin.include_tasks: remove-c2r.yml
...
19 changes: 19 additions & 0 deletions roles/common/tasks/remove-c2r.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Remove gpg key
ansible.builtin.file:
path: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
state: absent
when: common_gpg_key_remove

- name: Remove convert2rhel repo
ansible.builtin.file:
path: /etc/yum.repos.d/convert2rhel.repo
state: absent
when: common_convert2rhel_repo_remove

- name: Remove convert2rhel package
ansible.builtin.package:
name: convert2rhel
state: absent
when: common_convert2rhel_package_remove
...
3 changes: 3 additions & 0 deletions roles/common/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# vars file for common
common_gpg_key_remove: false
common_convert2rhel_repo_remove: true
common_convert2rhel_package_remove: true
...

0 comments on commit 03a5938

Please sign in to comment.