From 3d58c5a30af2e79682df93ccb87d6e9b64b2bb3c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 15 Jun 2020 11:44:48 -0500 Subject: [PATCH] Don't install puppet modules when we don't need them We are currently cloning all of the puppet modules in install-ansible, but we only need them when we run run-puppet. Move the cloning there so that we can stop wasting the time in CI jobs that don't need them. In prod, this should not have much impact. Change-Id: I641ffc09e9e0801e0bc2469ceec97820ba354160 --- playbooks/roles/install-ansible/tasks/main.yaml | 5 ----- playbooks/roles/run-puppet/tasks/main.yaml | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/playbooks/roles/install-ansible/tasks/main.yaml b/playbooks/roles/install-ansible/tasks/main.yaml index c0774dc272..3590c89331 100644 --- a/playbooks/roles/install-ansible/tasks/main.yaml +++ b/playbooks/roles/install-ansible/tasks/main.yaml @@ -142,11 +142,6 @@ - install_modules.sh - modules.env -- name: Run puppet module install - command: - cmd: bash install_modules.sh - chdir: /etc/puppet - - name: Copy yamlgroup inventory in place copy: src: inventory_plugins/yamlgroup.py diff --git a/playbooks/roles/run-puppet/tasks/main.yaml b/playbooks/roles/run-puppet/tasks/main.yaml index ea2f11474c..9573186f6a 100644 --- a/playbooks/roles/run-puppet/tasks/main.yaml +++ b/playbooks/roles/run-puppet/tasks/main.yaml @@ -7,5 +7,13 @@ name: puppet-install - include_role: name: disable-puppet-agent + +- name: Run puppet module install + delegate_to: localhost + run_once: true + command: + cmd: bash install_modules.sh + chdir: /etc/puppet + - include_role: name: puppet