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
This commit is contained in:
parent
1a8c2f66da
commit
92c9a7c869
@ -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:
|
||||
|
10
playbooks/group_vars/puppet.yaml
Normal file
10
playbooks/group_vars/puppet.yaml
Normal file
@ -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…
x
Reference in New Issue
Block a user