diff --git a/ansible/roles/common/defaults/main.yml b/ansible/roles/common/defaults/main.yml index 0ba35bcb85..e3895f1181 100644 --- a/ansible/roles/common/defaults/main.yml +++ b/ansible/roles/common/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Due to the way we do our inventory, ansible does not pick up on the fact that +# this role has already run. We can track what has run with host facts. +common_run: False + #################### # Docker #################### diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml index b017e8b4ad..e261f83ee5 100644 --- a/ansible/roles/common/tasks/main.yml +++ b/ansible/roles/common/tasks/main.yml @@ -1,2 +1,8 @@ --- - include: "{{ action }}.yml" + when: not common_run + +- name: Registering common role has run + set_fact: + common_run: True + when: not common_run