Hi,
We are currently getting started with Ansible, and we really like it!
Since we use RHEL for a large part of our infra I did an attempt to
create an Ansible module that allows you to
add or remove software channels from a machine. I tried to keep the
dependencies to other Python mods to a
minimum and currently only use things from Python core.
I do however have some doubts and it would be nice if someone would
share his thoughts
To test the module I used a hostname variable. It is of course not
meant to stay that way because that would
make the module rather useless...
My plan was to use the hostname var because we register our machines
in rhn with their hostname, but other
people might give it names other than the hostname. Any suggestions on this?
Currently I fetch the machine's id from rhn while I could get it from
/etc/sysconfig/rhn/systemid (I already made a function
for that in the module). The reason for this is that I've seen
machines where the local systemid differs from the systemid in rhn.
I would like to go for the local systemid since it makes things
easier... Suggestions?
Let me also tell you that I'm a newbie in Python, but I must say that
I really enjoy it and plan on extending this module.
It would maybe be nice to add rhn info about the machine to the machine's facts?
Module on Github :
https://github.com/vincentvdk/ansible_modules/tree/master/rhn
Thanks!
Vincent