Browse Source

install-ansible: move install_modules.sh to puppet-setup-ansible

Modules are collected on bridge and then synchronized to remote hosts
where puppet is run.  This is done to ensure an atomic run of puppet
across affected hosts.

These modules are described in modules.env and cloned by
install_modules.sh.  Currently this is done in install-ansible, but
after some recent refactoring
(I3b1cea5a25974f56ea9202e252af7b8420f4adc9) the best home for it
appears to now be in puppet-setup-ansible; just before the script is
run.

Change-Id: I4b1d709d7037e2851d73be4bc7a202f52858ad4f
changes/04/749604/1
Ian Wienand 2 years ago
parent
commit
b3c01b30b3
  1. 15
      playbooks/roles/install-ansible/tasks/main.yaml
  2. 0
      playbooks/roles/puppet-setup-ansible/files/install_modules.sh
  3. 0
      playbooks/roles/puppet-setup-ansible/files/modules.env
  4. 13
      playbooks/roles/puppet-setup-ansible/tasks/main.yaml

15
playbooks/roles/install-ansible/tasks/main.yaml

@ -119,21 +119,6 @@
owner: root
group: root
# Yeah. This is install-ansible. But we need to do this and doing it when
# we install the ansible stuff seems like the right time workflow-wise.
- name: Ensure puppet directory
file:
state: directory
path: /etc/puppet
- name: Install puppet module management scripts
copy:
src: '{{ item }}'
dest: '/etc/puppet/{{ item }}'
loop:
- install_modules.sh
- modules.env
- name: Copy yamlgroup inventory in place
copy:
src: inventory_plugins/yamlgroup.py

0
playbooks/roles/install-ansible/files/install_modules.sh → playbooks/roles/puppet-setup-ansible/files/install_modules.sh

0
playbooks/roles/install-ansible/files/modules.env → playbooks/roles/puppet-setup-ansible/files/modules.env

13
playbooks/roles/puppet-setup-ansible/tasks/main.yaml

@ -4,6 +4,19 @@
ansible_roles:
- puppet
- name: Ensure puppet directory
file:
state: directory
path: /etc/puppet
- name: Install puppet module management scripts
copy:
src: '{{ item }}'
dest: '/etc/puppet/{{ item }}'
loop:
- install_modules.sh
- modules.env
- name: Run puppet module install on bridge
command:
cmd: bash install_modules.sh

Loading…
Cancel
Save