Merge "Add playbook to upgrade puppet"
This commit is contained in:
commit
b87f3064a7
@ -14,7 +14,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
export PUPPET_VERSION=${PUPPET_VERSION:-3}
|
||||
function puppet_version {
|
||||
PATH=/opt/puppetlabs/bin:$PATH puppet --version | cut -d '.' -f 1
|
||||
}
|
||||
export PUPPET_VERSION=$(puppet_version)
|
||||
|
||||
if [ "$PUPPET_VERSION" == "3" ] ; then
|
||||
export MODULE_PATH=/etc/puppet/modules
|
||||
|
12
playbooks/update_puppet_version.yaml
Normal file
12
playbooks/update_puppet_version.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
- hosts: 'puppet4'
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- git:
|
||||
repo: https://git.openstack.org/openstack-infra/system-config
|
||||
dest: /opt/system-config/production
|
||||
force: yes
|
||||
- shell: ./install_puppet.sh
|
||||
args:
|
||||
chdir: /opt/system-config/production
|
||||
environment:
|
||||
PUPPET_VERSION: 4
|
@ -32,6 +32,8 @@ set +e
|
||||
|
||||
# First, sync the puppet repos with all the machines
|
||||
timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/update_puppet.yaml
|
||||
# Update the puppet version
|
||||
timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/update_puppet_version.yaml
|
||||
# Run the git/gerrit/zuul sequence, since it's important that they all work together
|
||||
timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/remote_puppet_git.yaml
|
||||
# Run AFS changes separately so we can make sure to only do one at a time
|
||||
|
Loading…
Reference in New Issue
Block a user