diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/git_repositories/tasks/main.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/git_repositories/tasks/main.yml b/roles/git_repositories/tasks/main.yml index 112e372..21f7513 100644 --- a/roles/git_repositories/tasks/main.yml +++ b/roles/git_repositories/tasks/main.yml @@ -22,9 +22,17 @@ - shell: creates={{ git_repositories_dir }}/{{ item.name }}/config chdir={{ git_repositories_dir }}/{{ item.name }} git init --bare -q --shared=group with_items: git_repositories +# refactor this one and the next if https://github.com/ansible/ansible-modules-core/pull/520 is merged - file: path: "{{ git_repositories_dir }}/{{ item.name }}/git-daemon-export-ok" - state: "{% if item.private is defined and item.private %}absent{% else %}touch{% endif %}" + state: absent + when: item.private is defined and item.private + with_items: git_repositories + +- copy: + dest: "{{ git_repositories_dir }}/{{ item.name }}/git-daemon-export-ok" + content: "" + when: item.private is not defined or not item.private with_items: git_repositories - copy: |