aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/docker/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/docker/tasks/main.yml')
-rw-r--r--roles/docker/tasks/main.yml12
1 files changed, 9 insertions, 3 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index a5327e0..26089f3 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,14 +1,20 @@
-- name: Ensure ansible_facts used by role
+- name: Get host distro
ansible.builtin.setup:
- gather_subset: os_family
+ gather_subset:
+ - distribution
+ - distribution_major_version
+ - distribution_release
+ - os_family
- name: Set platform-specific variables
ansible.builtin.include_vars: "{{ __docker_vars_file }}"
loop:
- "{{ ansible_facts['os_family'] }}.yml"
+ - "{{ ansible_facts['distribution'] }}.yml"
+ - "{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}.yml"
vars:
__docker_vars_file: "{{ role_path }}/vars/{{ item }}"
- when: __docker_vars_file is file
+ when: __docker_vars_file is exists
- name: Configure Docker logging driver
when: docker_logging_driver is defined and docker_logging_driver