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

Consider using requirements.yml and with ansible-galaxy to handle roles #140

Open
umeboshi2 opened this issue Dec 1, 2015 · 3 comments
Open

Comments

@umeboshi2
Copy link

Newer versions of ansible have a nice requirements format, making the debops-update script more flexible.

I made a function here making use of it: https://github.com/umeboshi2/demosthenes/blob/master/demosthenes/scripts/demos_update.py#L103

A potential downside is that roles in version control are tarballed and extracted, rather than cloned into the roles_path.

I took the time to make a simple conversion of the galaxy requirements files in the debops-playbooks repo. debops/debops-playbooks#217

@drybjed
Copy link
Member

drybjed commented Dec 1, 2015

It might be a good idea to at least support the .yml format in addition to the old one, so having them in the repository as a first step is good, thanks.

To be honest after using debops-update after all that time I'm still not sure which method is better - downloading and extracting tarballs, or cloning git repositories directly. I guess at this point there's very little difference. One advantage of debops-update over ansible-galaxy is that it also updates the debops-playbooks repository which holds the list of DebOps roles - that makes it very easy to add new roles to the stack or remove the obsolete ones from the requirelements list.

@umeboshi2
Copy link
Author

Absolutley agree with the update command over using ansible-galaxy directly. I set that function up in demos-update to keep the playbook behavior, while getting more flexibility from the roles and using the locally configured roles_path at the same time. There may be a problem in the future if a path: option is defined for a role in the requirements file. I am convinced that it would be best to handle the point of cloning a role directly in ansible-galaxy, by making another role option in the yaml file, rather than trying to work around a shortcoming that can probably be more easily fixed at the source.

@umeboshi2
Copy link
Author

There's currently an issue here for ansible-galaxy to track repos: ansible/ansible#12353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants