63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
---
|
|
# Copyright 2019 Red Hat, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
|
|
- name: set is_bootstrap_node fact
|
|
set_fact:
|
|
is_bootstrap_node: "{{ tripleo_packages_short_bootstrap_node_name|lower == ansible_facts['hostname']|lower }}"
|
|
|
|
- name: Debug fast forward upgrade repo variables
|
|
debug:
|
|
var: "{{ item }}"
|
|
loop:
|
|
- tripleo_packages_fast_forward_repo_type
|
|
- tripleo_packages_fast_forward_repo_args
|
|
when:
|
|
- (step | int) == 3
|
|
|
|
- when:
|
|
- (step | int) == 3
|
|
- is_bootstrap_node|bool
|
|
- tripleo_packages_fast_forward_repo_type == 'tripleo-repos'
|
|
block:
|
|
- name: clone tripleo-repos
|
|
git:
|
|
repo: https://github.com/openstack/tripleo-repos.git
|
|
dest: /home/stack/tripleo-repos/
|
|
version: master
|
|
|
|
- name: install tripleo-repos
|
|
command: python setup.py install
|
|
args:
|
|
chdir: /home/stack/tripleo-repos/
|
|
|
|
- name: Enable tripleo-repos
|
|
command: "tripleo-repos {{ tripleo_packages_fast_forward_repo_args.tripleo_repos[tripleo_release] }}"
|
|
|
|
- when:
|
|
- (step | int) == 3
|
|
- is_bootstrap_node|bool
|
|
- tripleo_packages_fast_forward_repo_type == 'custom-script'
|
|
block:
|
|
- name: Create custom Script for upgrading repo.
|
|
copy:
|
|
dest: /root/ffu_update_repo.sh
|
|
content: "{{ tripleo_packages_fast_forward_custom_repo_script_content }}"
|
|
mode: 0700
|
|
|
|
- name: Execute custom script for upgrading repo.
|
|
shell: "/root/ffu_update_repo.sh {{ tripleo_release }}"
|