Merge "Add playbook to upgrade puppet"

This commit is contained in:
Zuul 2018-06-19 19:11:46 +00:00 committed by Gerrit Code Review
commit b87f3064a7
3 changed files with 18 additions and 1 deletions

View File

@ -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

View 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

View File

@ -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