It might be nice for us to have a module for packer.io, which uses various CM tools to build images. It’s pretty new.
I’m not a Go developer, though I figured someone might like to do this, and there were probably go developers on the list.
It’s small compensation, but if anyone wants gets one accepted, we’ll send you a shirt and some stickers and build a statue of you in our formal gardens*
= note, we don’t have any formal gardens yet. But when we do! Yes, we’ll do it in bronze, and maybe with you riding a horse.
In order to write ansible plugin of packer, I think the ssh
information such as addr, port, user and pass is required.
So I tend to get these from Communicator but it seems it can not.
I posted the question to the packer's ML[1] and got the answer about
it can not yet.
Additionally, there are several types of Communicator like chroot.
so if you will implement same as my thought, you may need to implement
getting information function to base Communicator type and switching
behavior by connection type.
(fortunately, ansible has chroot connection!)
Since I am not familiar with packer, if you will work the plugin, I am
glad to. and a statue will be yours
As you said the communicator doesn’t provide this kind of thing yet and the communicator is abstraction with the builder so we cannot take assumption on the protocol used.
I discussed my 3 approach that I had in mind with mitchell :
getting the connection from the communicator some how … not easy and I need to read more the source and if possible not flexible on protocol
I think the first version should be in local mode. It’s not perfect but it will help the community to start using packer with Ansible and make progress the things
Now local mode make sense if you think in term of immutable server :
Because you don’t care about doing any update and I prefer to have the playbook there to being able to debug and ensure which playbooks generated which image.
I hope having something before the weekend but if not should be done for Monday.
I have also considered about local mode -- a.k.a. ansible-pull.
However, before using ansible-pull in the box, dependencies like a
paramiko and git, should be installed.
I think it is not simple way so I put away once.
But I agree to implement the local mode approach as a first step.
I need to check out Packer.io because although it is early, it seems to have similar functionality to Aminator, but for a broader audience, and so may win in the long run.
If you do start working on this, please let me know. I’d love to help out where I can.
I found time to work on it but I’m struggling on one part…
As I’m getting started with Ansible local mode, I need to install Ansible on the host.
I don’t really like to assume that ansible is pre-installed which is the approach of Aminator.
On the other hand Ansible doesn’t have an bootstrap script as Salt does.
I have one attribute called : ‘install-script’ which the path to a local script to install ansible on the target OS or we may consider to work on community install script ?
Do you have any suggestions?
Otherwise everything else is simple to do the Ansible provisioner.
I’ve taken a stab at this and got something I’m pretty happy with. I’m basically doing something similar to ansible-pull, but instead of pulling things down using git, I’m pushing up user specified playbooks and roles.