ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.01k stars 3.42k forks source link

make_local_copy opt-out git clone in favor of tree copy #7346

Open kapouer opened 4 years ago

kapouer commented 4 years ago

https://github.com/ansible/awx/blob/241931309e134bc3ffb3b2badf358d62690f5452/awx/main/tasks.py#L2330 The git clone made by make_local_copy makes it impossible to use tools that need an initial setup, like git crypt. It would be great if there was a way to completely disable git clone here. Besides, all other scm types will just make a plain copy of the project tree, which works well in that use case.

Another approach would be to be able to run a custom playbook on update_project, but i'm not sure it's simpler.

AlanCoding commented 4 years ago

Rather not add more config options, particularly for things that should "just work".

I'm not against copying the tree in all cases, but there are probably issues that will crop up which I have not thought of yet. PR #7367 does this, and we will see what trouble comes out of it.

lassizci commented 3 years ago

git-crypt could be used by having inventory plugin that just calls git-crypt unlock. But the problem with AWX is the working directory isn't clean as all the symlinks change their type. Git-crypt on the other hand requires a clean repository. So I suppose that essentially blocks us from using AWX. Or is there any way around it?

AlanCoding commented 3 years ago

But the problem with AWX is the working directory isn't clean as all the symlinks change their type.

That wasn't the case before, and it's not really the intention. A recent patch landed in ansible-runner that should change this back to preserving symlinks.