Skip to content

Commit c794928

Browse files
authored
Merge pull request #1488 from sriramandev/topic/ssriraman/1482
Updating photon gpg keys should not enable disabled repo
2 parents 8b7b506 + 17df27b commit c794928

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

images/capi/ansible/roles/setup/tasks/photon.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
ansible.builtin.command: tdnf update -y photon-repos --enablerepo=photon --refresh
2727
register: distro
2828
changed_when: '"Nothing to do" not in distro.stderr'
29+
when: not disable_public_repos|default(false)|bool
2930

3031
- name: Perform a tdnf distro-sync
3132
ansible.builtin.command: tdnf distro-sync -y --refresh

images/capi/ansible/roles/sysprep/tasks/photon.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343

4444
- ansible.builtin.import_tasks: rpm_repos.yml
4545

46+
- name: Update the repos package to import the recent gpg keys
47+
ansible.builtin.command: tdnf update -y photon-repos --enablerepo=photon --refresh
48+
register: distro
49+
changed_when: '"Nothing to do" not in distro.stderr'
50+
when: disable_public_repos|default(false)|bool and reenable_public_repos|default(true)|bool
51+
4652
- name: Remove tdnf package caches
4753
ansible.builtin.command: /usr/bin/tdnf -y clean all
4854

0 commit comments

Comments
 (0)