Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

populate_mirror_registry | Ensure pullsecret is placed in config_file_path #278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions roles/populate_mirror_registry/tasks/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@
state: present
become: true

# The pullsecret is copied in config_file_path in setup_mirror_registry, and this copy can
# be modified in that role. This role is usually executed prior to populate_mirror_registry,
# so we need to check if the pullsecret is present there or not.
- name: "Check if {{ pull_secret_file_name }} has already been copied in {{ config_file_path }}"
stat:
path: "{{ config_file_path }}/{{ pull_secret_file_name }}"
register: copied_pull_secret

# If not present, let's copy it for the next tasks that require it.
- name: Copy pull_secret
copy:
src: "{{ local_pull_secret_path }}"
dest: "{{ config_file_path }}/{{ pull_secret_file_name }}"
mode: 0644
when:
- not copied_pull_secret.stat.exists

- name: Create download dirs
ansible.builtin.file:
path: "{{ item }}"
Expand Down