ansible / ansible-navigator

A text-based user interface (TUI) for Ansible.
https://ansible.readthedocs.io/projects/navigator/
Apache License 2.0
392 stars 102 forks source link

RFE: add an option to update roles and collections from requirements.yml like AWX / automation controller? #572

Open bonnevil opened 3 years ago

bonnevil commented 3 years ago
ISSUE TYPE
SUMMARY

AWX / automation controller / Ansible Tower have a feature (which I believe is turned on by default in Settings -> Jobs) that causes the automation controller to automatically install roles and collections specified in the playbook's directory by requirements.{yml,yaml} or collections/requirements.{yml,yaml} files. The playbook that automation controller uses to do this can be seen at https://github.com/ansible/awx/blob/devel/awx/playbooks/project_update.yml and the task involved is at line 196 at the time I'm writing this. This allows developers to avoid having to check the same collection into multiple projects in Git.

It would be really nice if ansible-navigator also had options to honor these requirements.yml files and use ansible-galaxy to automatically install roles and collections inside the EE. It would be convenient for developers and would parallel the behavior of AWX / automation controller.

cidrblock commented 3 years ago

Good idea, this would probably be exposed as an additional subcommand which ran galaxy for the user. Will be looked at closer later this year.

one-t commented 3 years ago

👍 - this will make the developer workflow moving between Navigator -> Controller much smoother.

cidrblock commented 2 years ago

Example:


collections:
  pull:
    policy:
    - force (ansible-galaxy collection force)
    - missing (ansible-galaxy collection install)
    - never (do nothing)
    - upgrade (ansible-galaxy collection upgrade)
``
ericzolf commented 2 years ago

Well, it should foremost act like controller/Awx does.

cidrblock commented 2 years ago

Will need to check what the default behaviour of controller/AWX is, I'm assuming it is "missing", being it will collect anything not present, but not upgrade anything that is...

I'm eager to do this one after 2.0 is out the door :)

jdptechnc commented 2 years ago

I would like to see this enhancement as well!

Hapshanko commented 1 year ago

Is there an update on this? Currently manually installing our requirements.yml SCM roles, and then mounting them into the execution environment, so we could really use this solution instead.

michten commented 1 year ago

I just faced that it is missing in navigator 2.1... As the previous ones wrote, we need this, as this was whole point of navigator to use it for playbooks deployment for AAP.

cidrblock commented 1 year ago

We're talking about this! I'm not sure it will go into the navigator code base because we need this for a few projects but I think where we are headed will be good.