redhat-cop / aap_utilities

Ansible Collection for automated deployment of AAP and other objects for general use
https://galaxy.ansible.com/infra/aap_utilities
GNU General Public License v3.0
74 stars 45 forks source link

add aap-setup-download role to download automatically the AAP setup file #54

Closed ericzolf closed 2 years ago

ericzolf commented 2 years ago

What does this PR do?

Adds a role to automatically download the installer image from RHN

How should this be tested?

My playbook looks so far like this:

- name: download and install AAP from the bastion
  hosts: bastion.*
  gather_facts: false
  become: true
  tags: aap_installation
  roles:
    - redhat_cop.tower_utilities.aap_setup_download
  post_tasks:
    - debug:
        var: aap_setup_down_installer_file

And the only variable I really need to define in my vault is aap_setup_down_offline_token (see defaults/main.yml for the details and other variables).

Is there a relevant Issue open for this?

n/a

Other Relevant info, PRs, etc.

Adapted from https://www.redhat.com/en/blog/automating-installation-ansible-automation-platform-ansible-and-satellite

I still need to work on the "soft" aspects of the role, means documentation :-) hence still WiP, else it works good enough for me.

ericzolf commented 2 years ago

Ready for review, I'm working currently on the follow-up roles aap_setup_prepare and aap_setup_install but it takes longer to properly test...

sean-m-sullivan commented 2 years ago

I like the idea of this, and want to run it through some testing. However I think long term we need to incorporate the https://galaxy.ansible.com/middleware_automation/redhat_csp_download plugin and/or role. As that does a lot of our lifting in a reproducible way.

And looking at it, it might not be possible, BUT its something we should push for it to be available from if its not.

sean-m-sullivan commented 2 years ago

I was trying out a new task line to get the file name, and then went back and decided to not do that. Either way there is a PR for the changes I mentioned.