Clean up puppet variables and playbooks

The puppet playbooks were some of the first we wrote, so they're
slightly wonky.

Remove '---' lines that are completely unnecessary.

Fix indentation.

Move some variables that are the same everywhere into
ansible variables.

Put puppet related variables into the puppet group_vars.

Stop running puppet on localhost in the git playbook.

Change-Id: I2d2a4acccd3523f1931ebec5977771d5a310a0c7
changes/72/592972/5
Monty Taylor 4 years ago
parent 1a8c2f66da
commit 92c9a7c869
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
  1. 13
      playbooks/group_vars/all.yaml
  2. 10
      playbooks/group_vars/puppet.yaml
  3. 5
      playbooks/remote_puppet_adhoc.yaml
  4. 5
      playbooks/remote_puppet_afs.yaml
  5. 5
      playbooks/remote_puppet_else.yaml
  6. 29
      playbooks/remote_puppet_git.yaml
  7. 12
      playbooks/remote_puppet_infracloud.yaml
  8. 5
      playbooks/remote_puppet_infracloud_baremetal.yaml
  9. 2
      tools/test_puppet_apply.sh

@ -1,9 +1,3 @@
copy_hieradata: true
copy_puppet: true
manifest: /opt/system-config/manifests/site.pp
manifest_base: /opt/system-config
mgmt_manifestpath: /opt/system-config
puppet_logdest: syslog
distro_lookup_path:
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.{{ ansible_facts.architecture }}.yaml"
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.yaml"
@ -18,13 +12,6 @@ exim_base_aliases:
root: "{{ exim_sysadmins }}"
exim_aliases: "{{ exim_base_aliases|combine(exim_extra_aliases) }}"
puppet:
logdest: syslog
copy_hieradata: true
copy_puppet: true
manifest: /opt/system-config/manifests/site.pp
manifest_base: /opt/system-config
# When adding new users, always pick a UID larger than the last UID, do not
# fill in holes in the middle of the range.
all_users:

@ -0,0 +1,10 @@
# Puppet related variables
copy_hieradata: true
copy_puppet: true
puppet_reports: none
manage_config: true
manifest: /opt/system-config/manifests/site.pp
manifest_base: /opt/system-config
mgmt_manifestpath: /opt/system-config
puppet_logdest: syslog

@ -1,7 +1,4 @@
- hosts: '*'
strategy: free
gather_facts: true
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet

@ -1,8 +1,5 @@
---
- hosts: "afs*:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet

@ -1,7 +1,4 @@
- hosts: 'puppet:!review:!git0*:!zuul-scheduler:!afs*:!baremetal*:!controller*:!compute*:!puppetmaster*:!disabled'
strategy: free
gather_facts: true
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet

@ -1,46 +1,41 @@
---
- hosts: "localhost:!disabled"
strategy: free
gather_facts: true
connection: local
tasks:
# Note that git module does ls-remote if clone is set to no and places
# the remote_head value in returndict.after
- git: repo=https://git.openstack.org/openstack-infra/project-config clone=no
- name: Grab project-config repo info
git:
repo: https://git.openstack.org/openstack-infra/project-config
clone: no
register: gitinfo
roles:
- role: puppet
copy_hieradata: False
copy_puppet: False
manage_config: True
puppet_reports: none
- hosts: "git0*:!disabled"
- hosts: "git-server:!disabled"
strategy: free
gather_facts: true
max_fail_percentage: 1
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
manage_config: True
puppet_reports: none
- hosts: "review:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m
manage_config: True
puppet_reports: none
- hosts: "zuul-scheduler:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m
manage_config: True
puppet_reports: none

@ -1,16 +1,10 @@
---
- hosts: "controller*.ic.openstack.org:!disabled"
gather_facts: true
serial: 1
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet
- hosts: "compute*.ic.openstack.org:!disabled"
gather_facts: true
max_fail_percentage: 100
serial: "10%"
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet

@ -1,7 +1,4 @@
---
- hosts: "baremetal*.ic.openstack.org:!disabled"
gather_facts: true
roles:
- role: puppet
manage_config: True
puppet_reports: none
- puppet

@ -24,6 +24,8 @@ remote_tmp=$ansible_root/remote_tmp
EOF
cat > $ansible_root/hosts <<EOF
localhost ansible_connection=local
[puppet]
localhost
EOF
echo "##" > $fileout
cat $file > $fileout

Loading…
Cancel
Save