Rework include OS-specific variables logic

Because ubuntu-xenial is using systemd, and trusty is not, we now have
the need to do specific things on each version of ubuntu. As a result,
we now have 3 vars files to include.

Change-Id: I728ddd3e464a63398e16480407e0f1482bf4e106
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-11-24 12:54:34 -05:00
parent a831d2a607
commit 7e7896ed98
4 changed files with 73 additions and 1 deletions

View File

@ -13,7 +13,12 @@
# under the License.
---
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yaml"
include_vars: "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yaml"
when: ansible_os_family == 'Debian'
- name: Include OS-specific variables.
include_vars: "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}.yaml"
when: ansible_os_family == 'RedHat'
- include: "{{ nodepool_task }}.yaml"
with_items: "{{ nodepool_task_manager }}"

67
vars/ubuntu-xenial.yaml Normal file
View File

@ -0,0 +1,67 @@
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
__nodepool_build_depends:
- git
- libffi-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- python-dev
- zlib1g-dev
__nodepool_file_nodepool_service_dest: /etc/init.d/nodepool
__nodepool_file_nodepool_service_mode: 0755
__nodepool_file_nodepool_service_src: etc/init.d/nodepool
__nodepool_file_nodepool_service_config_dest: /etc/default/nodepool
__nodepool_file_nodepool_service_config_mode: 0644
__nodepool_file_nodepool_service_config_src: etc/default/nodepool
__nodepool_file_nodepool_builder_service_dest: /etc/init.d/nodepool-builder
__nodepool_file_nodepool_builder_service_mode: 0755
__nodepool_file_nodepool_builder_service_src: etc/init.d/nodepool-builder
__nodepool_file_nodepool_builder_service_config_dest: /etc/default/nodepool-builder
__nodepool_file_nodepool_builder_service_config_mode: 0644
__nodepool_file_nodepool_builder_service_config_src: etc/default/nodepool-builder
__nodepool_file_nodepool_deleter_service_dest: /etc/init.d/nodepool-deleter
__nodepool_file_nodepool_deleter_service_mode: 0755
__nodepool_file_nodepool_deleter_service_src: etc/init.d/nodepool-deleter
__nodepool_file_nodepool_deleter_service_config_dest: /etc/default/nodepool-deleter
__nodepool_file_nodepool_deleter_service_config_mode: 0644
__nodepool_file_nodepool_deleter_service_config_src: etc/default/nodepool-deleter
__nodepool_file_nodepool_launcher_service_dest: /etc/init.d/nodepool-launcher
__nodepool_file_nodepool_launcher_service_mode: 0755
__nodepool_file_nodepool_launcher_service_src: etc/init.d/nodepool-launcher
__nodepool_file_nodepool_launcher_service_config_dest: /etc/default/nodepool-launcher
__nodepool_file_nodepool_launcher_service_config_mode: 0644
__nodepool_file_nodepool_launcher_service_config_src: etc/default/nodepool-launcher