diff --git a/ansible/roles/virtualbmc-daemon/defaults/main.yml b/ansible/roles/virtualbmc-daemon/defaults/main.yml index e31f6d9..1bca599 100644 --- a/ansible/roles/virtualbmc-daemon/defaults/main.yml +++ b/ansible/roles/virtualbmc-daemon/defaults/main.yml @@ -1,9 +1,4 @@ --- -# List of package dependencies to install. -# TODO: Make platform-independent. -vbmcd_packages: - - gcc - - libvirt-devel # The path to the virtualenv in which to install Virtual BMC. vbmcd_virtualenv_path: # The URL of the upper constraints file to pass to pip when installing Python diff --git a/ansible/roles/virtualbmc-daemon/tasks/main.yml b/ansible/roles/virtualbmc-daemon/tasks/main.yml index 1071e17..fcb4504 100644 --- a/ansible/roles/virtualbmc-daemon/tasks/main.yml +++ b/ansible/roles/virtualbmc-daemon/tasks/main.yml @@ -1,4 +1,14 @@ --- +- name: Gather os specific variables + include_vars: "{{ item }}" + with_first_found: + - files: + - "{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml" + - "{{ ansible_distribution }}.yml" + - "{{ ansible_os_family }}.yml" + skip: true + tags: vars + - name: Ensure package dependencies are installed package: name: "{{ item }}" diff --git a/ansible/roles/virtualbmc-daemon/vars/Debian.yml b/ansible/roles/virtualbmc-daemon/vars/Debian.yml new file mode 100644 index 0000000..ee149bd --- /dev/null +++ b/ansible/roles/virtualbmc-daemon/vars/Debian.yml @@ -0,0 +1,5 @@ +--- +# List of package dependencies to install. +vbmcd_packages: + - gcc + - libvirt-dev diff --git a/ansible/roles/virtualbmc-daemon/vars/RedHat.yml b/ansible/roles/virtualbmc-daemon/vars/RedHat.yml new file mode 100644 index 0000000..1f73802 --- /dev/null +++ b/ansible/roles/virtualbmc-daemon/vars/RedHat.yml @@ -0,0 +1,5 @@ +--- +# List of package dependencies to install. +vbmcd_packages: + - gcc + - libvirt-devel