Hi there,
I just started using Ansible, and coming from other provisioning tools, I created several different roles.
On the documentation you are able to run ansible webservers -m service -a "name=httpd state=running"
and apply a module to several different servers.
The flow I was imagining was that I would be able to choose a set of servers, and with the ansible
command, apply roles, the same way we apply a module.
I looked up on the arguments that you could pass to the command, and it does not accept roles.
Asking on IRC, the suggested way was to generate a minimal playbook on the fly, similar to
---
- hosts: all
role:
- webserver
I think it is not the ideal way. It is more of a workaround and reflects that roles are not first-class concepts on Ansible.
I thought that we could add --role
option to ansible
command, or even create a role
module that apply roles.
As I just start with Ansible, I am not familiar with the code base as well as the ways you can extend Ansible (eg: modules).
How do you see this working? Where do you suggest to start digging into?
I would love to help on this and hear suggestion on where to start.
Cheers,