tvl tvl - 1 month ago 8
Git Question

Ansible Galaxy keep SCM files

I'm using the command:

ansible-galaxy install -r requirements.yml


where
requirements.yml
is:

- src: https://github.com/USERNAME/ANSIBLE-ROLE.git
version: master
scm: git


and it creates the directory:
/etc/ansible/roles/ANSIBLE-ROLE


How I can keep the SCM files like the
.git
directory?

Answer

I guess your are out of luck here.
This is how things done: mkdir, clone, checkout, archive, rmtree.
Then required role is installed from temporary archive file.