From e60f04337d05ac4e28425ae38fe10271e8cbc48c Mon Sep 17 00:00:00 2001 From: adamus1red Date: Fri, 31 Dec 2021 15:29:52 +0000 Subject: [PATCH] Add OS specific variable overrides. Specifically Alpine official repo uses `docker` rather than `docker-ce` or `docker-ee` --- tasks/main.yml | 10 ++++++++++ vars/Alpine.yml | 2 ++ vars/default.yml | 2 ++ 3 files changed, 14 insertions(+) create mode 100755 vars/Alpine.yml create mode 100755 vars/default.yml diff --git a/tasks/main.yml b/tasks/main.yml index 7db3b93..aafabc5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,14 @@ --- +- name: Load OS specific package information + include_vars: "{{ lookup('first_found', params) }}" + vars: + params: + files: + - '{{ansible_distribution}}.yml' + - '{{ansible_os_family}}.yml' + - default.yml + paths: + - 'vars' - include_tasks: setup-RedHat.yml when: ansible_os_family == 'RedHat' diff --git a/vars/Alpine.yml b/vars/Alpine.yml new file mode 100755 index 0000000..0cb91f6 --- /dev/null +++ b/vars/Alpine.yml @@ -0,0 +1,2 @@ +--- +docker_package: "docker" diff --git a/vars/default.yml b/vars/default.yml new file mode 100755 index 0000000..805232b --- /dev/null +++ b/vars/default.yml @@ -0,0 +1,2 @@ +--- +# Empty file