-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: update ansible-do generator playbook to use dzangolab ansible collection #27
Conversation
@@ -22,7 +22,7 @@ docker.data-folder: | |||
|
|||
install: | |||
@printf "\033[0;32m>>> Install ansible roles\033[0m\n" | |||
ansible-galaxy install -r requirements.yml --force | |||
ansible-galaxy collection install dzangolab.ansible --force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collections can be listed in requirements.txt. See https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html#collection-requirements-file. This is ultimately more flexible than hard-coding the collection to install in the makefile. (the makefile is only a convenience tool, it should not contain any logic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, changes has been made.
@@ -8,5 +8,7 @@ | |||
|
|||
- name: Install aws-cli | |||
hosts: awscli | |||
collections: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where you found this syntax.
I have found instead that the FQN of the role should be used. see https://docs.ansible.com/ansible/latest/collections_guide/collections_using_playbooks.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, changes has been made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried using the module syntax but did not worked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax you proposed is only usable for module and therefore doesn't work for a role wich we have, it is technically possible to change a role into a module to some degrees but just for syntax preferences it is too much work for what it would benefit.
…collection (#27) * chore: update ansible-do generator playbook to use dzangolab ansible collection * chore: changed the way we use ansible collection using FQCN and a requirements file * chore: change file name * chore: source default is already the same --------- Co-authored-by: Anthony Phothirath <[email protected]>
Removed requirement.yml
make install now install the dzangolab ansible collection
playbook now use the dzangolab ansible collection