Monty Taylor 4cb06ec6f2 Only install ansible roles once per run
We're running this per-host delegated to localhost. We only want
to run it once, otherwise we have parallel competing git processes.

Change-Id: I8585a1af2dcc294c0e61fc45d9febb044e42151d
2020-05-23 08:58:48 -05:00

11 lines
335 B
YAML

- name: Install ansible roles to /etc/ansible/roles
git:
repo: '{{ ansible_role_src_root }}/src/opendev.org/opendev/ansible-role-{{ ansible_role }}'
dest: '/etc/ansible/roles/{{ ansible_role }}'
force: yes
delegate_to: localhost
run_once: true
loop: '{{ ansible_roles }}'
loop_control:
loop_var: ansible_role