From 6d60482158e7a4ba12ec1c2000f5193daa8c512e Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 12 Sep 2017 16:58:03 -0600 Subject: [PATCH] Flatten the role task includes Currently there are several layers to work through when following what happens in the role. This is confusing and somewhat frustrating. This patch hopefully reduces the layers to a more sane set. Change-Id: I5f1a8c8465fa27b01342315dac5db0046cfb2e18 --- tasks/install.yml | 18 ------------------ tasks/install_offline.yml | 2 -- tasks/install_online.yml | 2 -- tasks/main.yml | 10 +++++++++- 4 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 tasks/install.yml diff --git a/tasks/install.yml b/tasks/install.yml deleted file mode 100644 index 6ad9fa2..0000000 --- a/tasks/install.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# 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. - -- include: pre_install.yml - -- include: "install_{{ pip_offline_install | ternary('offline', 'online') }}.yml" diff --git a/tasks/install_offline.yml b/tasks/install_offline.yml index 98530e6..b5b8abf 100644 --- a/tasks/install_offline.yml +++ b/tasks/install_offline.yml @@ -95,5 +95,3 @@ - name: Set source install pip_get_pip_options set_fact: pip_source_install_options: "--no-index --find-links={{ pip_tmp_packages | quote }}" - -- include: install_source.yml diff --git a/tasks/install_online.yml b/tasks/install_online.yml index f0600a6..6b40d97 100644 --- a/tasks/install_online.yml +++ b/tasks/install_online.yml @@ -41,5 +41,3 @@ delay: 2 tags: - pip-install-script - -- include: install_source.yml diff --git a/tasks/main.yml b/tasks/main.yml index 087f63a..86a20c9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,6 +28,14 @@ tags: - pip_install-install -- include: install.yml +- include: pre_install.yml + tags: + - pip_install-install + +- include: "install_{{ pip_offline_install | ternary('offline', 'online') }}.yml" + tags: + - pip_install-install + +- include: install_source.yml tags: - pip_install-install