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:
|
distro_lookup_path:
|
||||||
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.{{ ansible_facts.architecture }}.yaml"
|
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.{{ ansible_facts.architecture }}.yaml"
|
||||||
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.yaml"
|
- "{{ ansible_facts.distribution }}.{{ ansible_facts.lsb.codename }}.yaml"
|
||||||
@ -18,13 +12,6 @@ exim_base_aliases:
|
|||||||
root: "{{ exim_sysadmins }}"
|
root: "{{ exim_sysadmins }}"
|
||||||
exim_aliases: "{{ exim_base_aliases|combine(exim_extra_aliases) }}"
|
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
|
# When adding new users, always pick a UID larger than the last UID, do not
|
||||||
# fill in holes in the middle of the range.
|
# fill in holes in the middle of the range.
|
||||||
all_users:
|
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: '*'
|
- hosts: '*'
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
- hosts: "afs*:!disabled"
|
- hosts: "afs*:!disabled"
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
- hosts: 'puppet:!review:!git0*:!zuul-scheduler:!afs*:!baremetal*:!controller*:!compute*:!puppetmaster*:!disabled'
|
- hosts: 'puppet:!review:!git0*:!zuul-scheduler:!afs*:!baremetal*:!controller*:!compute*:!puppetmaster*:!disabled'
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -1,46 +1,41 @@
|
|||||||
---
|
|
||||||
- hosts: "localhost:!disabled"
|
- hosts: "localhost:!disabled"
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
|
||||||
connection: local
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# Note that git module does ls-remote if clone is set to no and places
|
# Note that git module does ls-remote if clone is set to no and places
|
||||||
# the remote_head value in returndict.after
|
# 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
|
register: gitinfo
|
||||||
roles:
|
|
||||||
- role: puppet
|
- hosts: "git-server:!disabled"
|
||||||
copy_hieradata: False
|
|
||||||
copy_puppet: False
|
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
- hosts: "git0*:!disabled"
|
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
|
||||||
max_fail_percentage: 1
|
max_fail_percentage: 1
|
||||||
roles:
|
roles:
|
||||||
|
|
||||||
- role: puppet
|
- role: puppet
|
||||||
facts:
|
facts:
|
||||||
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
- hosts: "review:!disabled"
|
- hosts: "review:!disabled"
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
|
|
||||||
- role: puppet
|
- role: puppet
|
||||||
facts:
|
facts:
|
||||||
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
||||||
puppet_timeout: 60m
|
puppet_timeout: 60m
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
- hosts: "zuul-scheduler:!disabled"
|
- hosts: "zuul-scheduler:!disabled"
|
||||||
strategy: free
|
strategy: free
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
|
|
||||||
- role: puppet
|
- role: puppet
|
||||||
facts:
|
facts:
|
||||||
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
|
||||||
puppet_timeout: 60m
|
puppet_timeout: 60m
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
---
|
|
||||||
- hosts: "controller*.ic.openstack.org:!disabled"
|
- hosts: "controller*.ic.openstack.org:!disabled"
|
||||||
gather_facts: true
|
|
||||||
serial: 1
|
serial: 1
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
- hosts: "compute*.ic.openstack.org:!disabled"
|
- hosts: "compute*.ic.openstack.org:!disabled"
|
||||||
gather_facts: true
|
|
||||||
max_fail_percentage: 100
|
max_fail_percentage: 100
|
||||||
serial: "10%"
|
serial: "10%"
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
---
|
---
|
||||||
- hosts: "baremetal*.ic.openstack.org:!disabled"
|
- hosts: "baremetal*.ic.openstack.org:!disabled"
|
||||||
gather_facts: true
|
|
||||||
roles:
|
roles:
|
||||||
- role: puppet
|
- puppet
|
||||||
manage_config: True
|
|
||||||
puppet_reports: none
|
|
||||||
|
@ -24,6 +24,8 @@ remote_tmp=$ansible_root/remote_tmp
|
|||||||
EOF
|
EOF
|
||||||
cat > $ansible_root/hosts <<EOF
|
cat > $ansible_root/hosts <<EOF
|
||||||
localhost ansible_connection=local
|
localhost ansible_connection=local
|
||||||
|
[puppet]
|
||||||
|
localhost
|
||||||
EOF
|
EOF
|
||||||
echo "##" > $fileout
|
echo "##" > $fileout
|
||||||
cat $file > $fileout
|
cat $file > $fileout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user