Closed chbrown13 closed 6 years ago
Maybe could all this be a role? We could submit it to Galaxy so Satellite customers can easily benefit from it as well (in Sat you can easily assign roles, not plays/playbooks).
If we make all functions a nicely defined role, it would be pluggable into many projects most of us have (you can do ansible-galaxy install -r ansible-requirements.txt
, similar to pip).
I agree roles are good, I wouldn't be thinking galaxy from the start as that can complicate and slow the pace as users can just as easily git clone as galaxy install IMO.
I would also point you at considering linting out of the gates -- https://github.com/willthames/ansible-lint
Why I mentioned Galaxy was that there are other projects which could benefit from the roles. But I have no idea how hard is to get role to Galaxy: if it is as simple as for Pip, I would be all for it. If this happens, we easilly drop same role satperf have:
And yes, I'm all for linting (from beginning).
And, once this is a role, do we need the python script at all? Why it is better than just using Ansible? I think it could lead to hiding some logic/functionality in Python and not in the roles, which would make reusing roles harder.
@chbrown13 with the switch to pure ansible, we can remove the python parts of this. That includes the init.py and setup.py
@chbrown13, thanks for getting this started, but for the moment would just mark this as DO NOT MERGE
.
@chbrown13, Also, just realized, please delete the test output it has a lot of sensitive stuff on GitHub.
Will close this PR and as mentioned in the mail, will work towards the directory structure, ansible rules and standard and raise PR's for it. Also will be sharing a mojo doc with the entire plan.
Added an initial setup.py and partition_disk job as an example.
However, much of this could be up for change depending on the discussion had by the entire team. One of the primary discussions being how we want to run these tasks: