geerlingguy / ansible-for-kubernetes

Ansible and Kubernetes examples from Ansible for Kubernetes Book
https://www.ansibleforkubernetes.com
MIT License
687 stars 313 forks source link

Add versions to requirements.yml examples #13

Open aharden opened 4 years ago

aharden commented 4 years ago

In a production Ansible configuration, it should be a best practice to provide desired versions of Galaxy roles that are to be downloaded to support the playbooks. I recommend adding versions to the roles in the requirements.yml files in the examples as you get closer to the 1.0 release.

geerlingguy commented 4 years ago

I have gone both ways on this, for the book examples:

That said, it would be kind of nice if Ansible let me say 'override versions and use latest' using the ansible-galaxy cli. I could also include two versions of the requirements.yml files, one with and one without (for CI), but that still requires more maintenance.

aharden commented 4 years ago

@geerlingguy I think a good compromise might be to explicitly put 'version: latest' in the examples and explain in the text that production processes should be locked into specific versions to avoid accidental breakage.

geerlingguy commented 4 years ago

@aharden Agreed. I think at a minimum I'll do that, and put a 'Warning' aside. Thanks for the suggestion!