Skip to content

Commit 76d4fdd

Browse files
authored
Merge pull request #602 from stackhpc/upstream/master-2026-08-10
Synchronise master with upstream
2 parents 5f752d1 + 312d271 commit 76d4fdd

33 files changed

Lines changed: 389 additions & 104 deletions

ansible/install.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
- name: Ensure dependencies are installed
3+
hosts: localhost
4+
gather_facts: true
5+
tags:
6+
- kolla-ansible
7+
- install
8+
- bootstrap
9+
vars:
10+
kolla_ansible_install_epel: "{{ dnf_install_epel }}"
11+
kolla_ansible_custom_requirements_search_paths_static:
12+
- "{{ kayobe_config_path }}"
13+
kolla_ansible_custom_requirements_search_paths: "{{ kolla_ansible_custom_requirements_search_paths_static + kayobe_env_search_paths | default([]) }}"
14+
kolla_ansible_custom_requirements_paths: "{{ kolla_ansible_custom_requirements_search_paths | map('regex_replace', '$', '/kolla/requirements.yml') | list }}"
15+
tasks:
16+
- name: Install Kayobe dependencies
17+
import_role:
18+
name: bootstrap
19+
tasks_from: install.yml
20+
21+
- name: Install kolla-ansible
22+
import_role:
23+
name: kolla-ansible
24+
tasks_from: install.yml

ansible/inventory/group_vars/all/dnf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
---
2-
# Yum configuration. Dict mapping Yum config option names to their values.
2+
# DNF configuration.
3+
4+
###############################################################################
5+
# DNF repository configuration.
6+
7+
# DNF configuration. Dict mapping DNF config option names to their values.
38
# dnf_config:
49
# proxy: http://proxy.example.com
510
dnf_config: {}
611

7-
# Whether or not to use a local Yum mirror. Default value is 'false'.
12+
# Whether or not to use a local DNF mirror. Default value is 'false'.
813
dnf_use_local_mirror: false
914

1015
# Mirror FQDN for DNF CentOS repos. Default value is 'mirror.stream.centos.org'.

ansible/inventory/group_vars/all/ipa

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ ipa_benchmarks: >
178178
# List of default kernel parameters for Ironic python agent.
179179
ipa_kernel_options_default: >
180180
{{ ['ipa-collect-lldp=' ~ ('1' if ipa_collect_lldp | bool else '0')] +
181-
['ipa-inspection-collectors=' ~ ipa_collectors | join(',')] +
182-
['ipa-inspection-benchmarks=' ~ ipa_benchmarks | join(',')] }}
181+
(['ipa-inspection-collectors=' ~ ipa_collectors | join(',')] if ipa_collectors else []) +
182+
(['ipa-inspection-benchmarks=' ~ ipa_benchmarks | join(',')] if ipa_benchmarks else []) }}
183183

184184
# List of additional kernel parameters for Ironic python agent.
185185
ipa_kernel_options_extra: []

ansible/kolla-ansible.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@
101101
name: kolla-ansible
102102
vars:
103103
kolla_ansible_control_host_become: "{{ kayobe_control_host_become | bool }}"
104-
kolla_ansible_install_epel: "{{ dnf_install_epel }}"
105-
kolla_ansible_custom_requirements_search_paths_static:
106-
- "{{ kayobe_config_path }}"
107-
kolla_ansible_custom_requirements_search_paths: "{{ kolla_ansible_custom_requirements_search_paths_static + kayobe_env_search_paths | default([]) }}"
108-
kolla_ansible_custom_requirements_paths: "{{ kolla_ansible_custom_requirements_search_paths | map('regex_replace', '$', '/kolla/requirements.yml') | list }}"
109104
kolla_external_fqdn_cert: "{{ kolla_config_path }}/certificates/haproxy.pem"
110105
kolla_internal_fqdn_cert: "{{ kolla_config_path }}/certificates/haproxy-internal.pem"
111106
kolla_ansible_passwords_path: "{{ kayobe_env_config_path }}/kolla/passwords.yml"

ansible/roles/arista-switch/templates/arista-config.j2

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
{{ line }}
55
{% endfor %}
66

7-
{% for interface, config in
8-
arista_switch_interface_config.items() %}
9-
interface {{ interface }}
7+
{% for interface, config in arista_switch_interface_config.items() %}
8+
interface {{ interface }}
109
{% if config.description is defined %}
11-
description {{ config.description }}
10+
description {{ config.description }}
1211
{% endif %}
1312
{% for line in config.config %}
14-
{{ line }}
13+
{{ line }}
1514
{% endfor %}
16-
exit
1715
{% endfor %}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
- block:
3+
- name: Testing privilege escalation
4+
raw: "true"
5+
become: true
6+
failed_when: false
7+
changed_when: false
8+
register: privilege_escalation_result
9+
10+
- name: Assert that we can escalate privileges
11+
assert:
12+
that:
13+
- privilege_escalation_result is success
14+
- '"password is required" not in privilege_escalation_result.stderr'
15+
fail_msg: >-
16+
Could not escalate privileges. You can either: set kayobe_control_host_become: true,
17+
set ansible_become_password, or set up passwordless sudo.
18+
when: kayobe_control_host_become | bool
19+
20+
- name: Include OS family-specific variables
21+
include_vars: "{{ ansible_facts.os_family }}.yml"
22+
23+
- name: Gather the package facts
24+
ansible.builtin.package_facts:
25+
manager: auto
26+
27+
- block:
28+
- name: Assert that all packages are installed if not using privilege escalation
29+
assert:
30+
that: missing_packages is falsy
31+
fail_msg: >-
32+
The following packages are missing from your system: {{ missing_packages | join(', ') }} and
33+
privilege escalation is disabled. Please get your system administator to install these packages
34+
or enable kayobe_control_host_become.
35+
when: not kayobe_control_host_become | bool
36+
37+
- name: Ensure required packages are installed
38+
package:
39+
name: "{{ bootstrap_package_dependencies }}"
40+
state: present
41+
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}"
42+
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
43+
become: True
44+
when: missing_packages is truthy
45+
vars:
46+
missing_packages: "{{ bootstrap_package_dependencies | difference(ansible_facts.packages.keys()) }}"

ansible/roles/bootstrap/tasks/main.yml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,4 @@
11
---
2-
- block:
3-
- name: Testing privilege escalation
4-
raw: "true"
5-
become: true
6-
failed_when: false
7-
changed_when: false
8-
register: privilege_escalation_result
9-
10-
- name: Assert that we can escalate privileges
11-
assert:
12-
that:
13-
- privilege_escalation_result is success
14-
- '"password is required" not in privilege_escalation_result.stderr'
15-
fail_msg: >-
16-
Could not escalate privileges. You can either: set kayobe_control_host_become: true,
17-
set ansible_become_password, or set up passwordless sudo.
18-
when: kayobe_control_host_become | bool
19-
20-
- name: Include OS family-specific variables
21-
include_vars: "{{ ansible_facts.os_family }}.yml"
22-
23-
- name: Gather the package facts
24-
ansible.builtin.package_facts:
25-
manager: auto
26-
27-
- block:
28-
- name: Assert that all packages are installed if not using privilege escalation
29-
assert:
30-
that: missing_packages is falsy
31-
fail_msg: >-
32-
The following packages are missing from your system: {{ missing_packages | join(', ') }} and
33-
privilege escalation is disabled. Please get your system administator to install these packages
34-
or enable kayobe_control_host_become.
35-
when: not kayobe_control_host_become | bool
36-
37-
- name: Ensure required packages are installed
38-
package:
39-
name: "{{ bootstrap_package_dependencies }}"
40-
state: present
41-
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}"
42-
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
43-
become: True
44-
when: missing_packages is truthy
45-
vars:
46-
missing_packages: "{{ bootstrap_package_dependencies | difference(ansible_facts.packages.keys()) }}"
47-
482
- name: Check whether an SSH key exists
493
stat:
504
path: "{{ bootstrap_ssh_private_key_path }}"

ansible/roles/dell-switch/templates/dellos10-config.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% for interface, config in dell_switch_interface_config.items() %}
88
interface {{ interface }}
99
{% if config.description is defined %}
10-
description {{ config.description }}
10+
description "{{ config.description }}"
1111
{% endif %}
1212
{% for line in config.config %}
1313
{{ line }}

ansible/roles/dell-switch/templates/dellos6-config.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% for interface, config in dell_switch_interface_config.items() %}
88
interface {{ interface }}
99
{% if config.description is defined %}
10-
description {{ config.description }}
10+
description "{{ config.description }}"
1111
{% endif %}
1212
{% for line in config.config %}
1313
{{ line }}

ansible/roles/dell-switch/templates/dellos9-config.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dell_switch_interface_config.items() %}
1212
{% if 'vlan' not in interface %}
1313
interface {{ interface }}
1414
{% if config.description is defined %}
15-
description {{ config.description }}
15+
description "{{ config.description }}"
1616
{% endif %}
1717
{% for line in config.config %}
1818
{{ line }}
@@ -25,7 +25,7 @@ dell_switch_interface_config.items() %}
2525
{% if 'vlan' in interface %}
2626
interface {{ interface }}
2727
{% if config.description is defined %}
28-
description {{ config.description }}
28+
description "{{ config.description }}"
2929
{% endif %}
3030
{% for line in config.config %}
3131
{{ line }}

0 commit comments

Comments
 (0)