I am using Ansible for config management and I'd like to adopt it even further to deploy custom code, which is compiled at some servers directly. There are no packages since the code is only internal and it's 12 Gentoo servers.
Can someone give me an example how you do this correctly? I checked for some snippets with the command
module but I don't think that is the way to do it.
Edit
As of Ansible 2.2 there is an archive module available.
old answer:
Ansible does not have an
archive
module, there is only the unarchive module which unpacks archives at the target host. Take a look at this ServerFault Q&A for further information.If you want to pack files on a remote host with Ansible you have to use the
command
module.Using the command module you can pack files like this:
If you want to archive file on the remote host for distribution to other remote hosts I suggest to take a look at the synchronize module.