Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 3e4abbd

Browse files
authored
Merge pull request #218 from bbezak/stable/wallaby
sync stable/wallaby with upstream
2 parents d02315a + 4a76d80 commit 3e4abbd

File tree

32 files changed

+337
-40
lines changed

32 files changed

+337
-40
lines changed

ansible/apt.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Ensure APT is configured
3+
hosts: seed-hypervisor:seed:overcloud
4+
vars:
5+
ansible_python_interpreter: /usr/bin/python3
6+
tags:
7+
- apt
8+
tasks:
9+
- name: include apt role
10+
include_role:
11+
name: apt
12+
when: ansible_facts.os_family == 'Debian'

ansible/group_vars/all/apt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44

55
# Apt cache TTL in seconds. Default is 3600.
66
apt_cache_valid_time: 3600
7+
8+
# Apt proxy URL for HTTP. Default is empty (no proxy).
9+
apt_proxy_http:
10+
11+
# Apt proxy URL for HTTPS. Default is {{ apt_proxy_http }}.
12+
apt_proxy_https: "{{ apt_proxy_http }}"

ansible/group_vars/all/bifrost

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ kolla_bifrost_source_url: "https://opendev.org/openstack/bifrost"
1111
# {{ openstack_branch }}.
1212
kolla_bifrost_source_version: "{{ openstack_branch }}"
1313

14+
# Whether Bifrost uses firewalld. Default value is false to avoid conflicting
15+
# with iptables rules configured on the seed host by Kayobe.
16+
kolla_bifrost_use_firewalld: False
17+
1418
# Firewalld zone used by Bifrost. Default is "trusted", to avoid blocking other
1519
# services running on the seed host.
1620
kolla_bifrost_firewalld_internal_zone: trusted

ansible/group_vars/all/globals

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@ os_distribution: "centos"
5151
# OS release. Valid options are "8-stream" when os_distribution is "centos", or
5252
# "focal" when os_distribution is "ubuntu".
5353
os_release: "{{ '8-stream' if os_distribution == 'centos' else 'focal' }}"
54+
55+
###############################################################################
56+
# Ansible configuration.
57+
58+
# Filter to apply to the setup module when gathering facts. Default is to not
59+
# specify a filter.
60+
kayobe_ansible_setup_filter: "{{ omit }}"
61+
62+
# Gather subset to apply to the setup module when gathering facts. Default is
63+
# to not specify a gather subset.
64+
kayobe_ansible_setup_gather_subset: "{{ omit }}"

ansible/kayobe-ansible-user.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
gather_facts: no
4141
vars:
4242
ansible_user: "{{ bootstrap_user }}"
43+
dnf_options:
44+
- "-y"
45+
- "{% if 'proxy' in dnf_config %}--setopt=proxy={{ dnf_config['proxy'] }}{% endif %}"
4346
tags:
4447
- ensure-python
4548
tasks:
@@ -49,8 +52,9 @@
4952
failed_when: false
5053
register: check_python
5154

55+
# TODO(priteau): Support apt proxy
5256
- name: Ensure python is installed
53-
raw: test -e /usr/bin/apt && (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo dnf -y install python3)
57+
raw: "test -e /usr/bin/apt && (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo dnf {{ dnf_options | select | join(' ') }} install python3)"
5458
when: check_python.rc != 0
5559

5660
- name: Ensure the Kayobe Ansible user account exists

ansible/kayobe-target-venv.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
- block:
2020
- name: Gather facts
2121
setup:
22-
when: not ansible_facts.module_setup | default(false)
22+
filter: "{{ kayobe_ansible_setup_filter }}"
23+
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
24+
when: not ansible_facts
2325
register: gather_facts
2426

2527
- name: Ensure the Python virtualenv package is installed
@@ -79,6 +81,8 @@
7981
# again using the interpreter from the virtual environment.
8082
- name: Gather facts
8183
setup:
84+
filter: "{{ kayobe_ansible_setup_filter }}"
85+
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
8286
when:
8387
- virtualenv is defined
8488
- gather_facts is not skipped

ansible/kolla-target-venv.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
- block:
2222
- name: Gather facts
2323
setup:
24-
when: not ansible_facts.module_setup | default(false)
24+
filter: "{{ kayobe_ansible_setup_filter }}"
25+
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
26+
when: not ansible_facts
2527

2628
- name: Ensure the Python virtualenv package is installed
2729
package:

ansible/overcloud-facts-gather.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: Gather facts
3+
hosts: overcloud
4+
gather_facts: false
5+
tasks:
6+
- name: Gather facts
7+
setup:
8+
filter: "{{ kayobe_ansible_setup_filter }}"
9+
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
10+
when: not ansible_facts
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
###############################################################################
3+
# Apt package manager configuration.
4+
5+
# Apt cache TTL in seconds. Default is 3600.
6+
apt_cache_valid_time: 3600
7+
8+
# Apt proxy URL for HTTP. Default is empty (no proxy).
9+
apt_proxy_http:
10+
11+
# Apt proxy URL for HTTPS. Default is {{ apt_proxy_http }}.
12+
apt_proxy_https: "{{ apt_proxy_http }}"

ansible/roles/apt/tasks/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- name: Configure apt proxy
3+
template:
4+
src: "01proxy.j2"
5+
dest: /etc/apt/apt.conf.d/01proxy
6+
owner: root
7+
group: root
8+
mode: 0664
9+
become: true
10+
when: apt_proxy_http | default('', true) | length > 0 or apt_proxy_https | default('', true) | length > 0
11+
12+
- name: Remove old apt proxy config
13+
file:
14+
path: /etc/apt/apt.conf.d/01proxy
15+
state: absent
16+
become: true
17+
when: apt_proxy_http | default('', true) | length == 0 and apt_proxy_https | default('', true) | length == 0

0 commit comments

Comments
 (0)