Browse Source

Merge "Ensure consistency with hostname comparison"

tags/12.2.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
17135d60d0
5 changed files with 14 additions and 14 deletions
  1. +3
    -3
      common/deploy-steps-tasks.yaml
  2. +2
    -2
      common/generate-config-tasks.yaml
  3. +3
    -3
      common/host-container-puppet-tasks.yaml
  4. +1
    -1
      deployment/haproxy/haproxy-public-tls-inject.yaml
  5. +5
    -5
      deployment/octavia/octavia-deployment-config.j2.yaml

+ 3
- 3
common/deploy-steps-tasks.yaml View File

@@ -153,18 +153,18 @@
# Bootstrap tasks - run any tasks that have been defined
########################################################

- name: "Clean container_puppet_tasks for {{ansible_hostname}} step {{step}}"
- name: "Clean container_puppet_tasks for {{ansible_hostname | lower}} step {{step}}"
file:
path: /var/lib/container-puppet/container-puppet-tasks{{step}}.json
state: absent
tags:
- container_config_tasks

- name: Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}
- name: Calculate container_puppet_tasks for {{ansible_hostname | lower}} step {{step}}
set_fact:
host_container_puppet_tasks: "{{host_container_puppet_tasks|default([]) + [item]}}"
loop: "{{container_puppet_tasks.get('step_' + step, [])}}"
when: (groups[item.service_name] | default ([]) | map('extract', hostvars, 'inventory_hostname') | sort | first) == ansible_hostname
when: (groups[item.service_name] | default ([]) | map('extract', hostvars, 'inventory_hostname') | sort | first | lower) == ansible_hostname | lower
vars:
container_puppet_tasks: "{{ lookup('file', tripleo_role_name + '/container_puppet_tasks.yaml', errors='ignore') | default({}, True) | from_yaml }}"
tags:


+ 2
- 2
common/generate-config-tasks.yaml View File

@@ -20,7 +20,7 @@
MOUNT_HOST_PUPPET: '{{docker_puppet_mount_host_puppet | default(true)}}'
CONTAINER_LOG_STDOUT_PATH: "{{ container_log_stdout_path }}"
CONTAINER_HEALTHCHECK_DISABLED: "{{ container_healthcheck_disabled }}"
SHORT_HOSTNAME: "{{ ansible_hostname }}"
SHORT_HOSTNAME: "{{ ansible_hostname | lower }}"
check_mode: no
register: generate_config_async_result

@@ -61,7 +61,7 @@
net_host: true
no_archive: false
puppet_config: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet.json"
short_hostname: "{{ ansible_hostname }}"
short_hostname: "{{ ansible_hostname | lower }}"
step: "{{ step }}"

- name: "Manage Puppet containers (generate config) for step {{ step }} with tripleo-ansible"


+ 3
- 3
common/host-container-puppet-tasks.yaml View File

@@ -1,4 +1,4 @@
- name: Write container-puppet-tasks json file for {{ansible_hostname}} step {{step}}
- name: Write container-puppet-tasks json file for {{ansible_hostname | lower}} step {{step}}
no_log: True
copy:
content: "{{host_container_puppet_tasks|to_nice_json}}"
@@ -27,7 +27,7 @@
CONTAINER_CLI: "{{ container_cli }}"
DEBUG: "{{ docker_puppet_debug }}"
MOUNT_HOST_PUPPET: '{{docker_puppet_mount_host_puppet}}'
SHORT_HOSTNAME: "{{ ansible_hostname }}"
SHORT_HOSTNAME: "{{ ansible_hostname | lower }}"
PROCESS_COUNT: "{{ docker_puppet_process_count }}"
register: bootstrap_tasks_async_result
no_log: true
@@ -61,7 +61,7 @@
net_host: true
no_archive: true
puppet_config: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet-tasks{{ step }}.json"
short_hostname: "{{ ansible_hostname }}"
short_hostname: "{{ ansible_hostname | lower }}"
step: "{{ step }}"

- name: "Manage Puppet containers (bootstrap tasks) for step {{ step }} with tripleo-ansible"


+ 1
- 1
deployment/haproxy/haproxy-public-tls-inject.yaml View File

@@ -85,7 +85,7 @@ outputs:
path: "{{cert_path}}"

- name: set is_haproxy_bootstrap_node fact
set_fact: is_haproxy_bootstrap_node={{haproxy_short_bootstrap_node_name == ansible_hostname}}
set_fact: is_haproxy_bootstrap_node={{haproxy_short_bootstrap_node_name | lower == ansible_hostname | lower}}

- name: get haproxy status
register: haproxy_state


+ 5
- 5
deployment/octavia/octavia-deployment-config.j2.yaml View File

@@ -297,10 +297,10 @@ outputs:
{%- if 'octavia_' ~ octavia_groups %}

{% for host in groups['octavia_' ~ octavia_group] -%}
{{ hostvars.raw_get(host)['ansible_hostname'] }}:
{{ hostvars.raw_get(host)['ansible_hostname'] | lower}}:
ansible_user: {{ hostvars.raw_get(host)['ansible_ssh_user'] | default('heat-admin') }}
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
canonical_hostname: {{ hostvars.raw_get(host)['canonical_hostname'] | default(host) }}
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) | lower }}
canonical_hostname: {{ hostvars.raw_get(host)['canonical_hostname'] | default(host) | lower }}
ansible_become: true
{% endfor %}

@@ -310,8 +310,8 @@ outputs:
Undercloud:
hosts:
{% for host in groups['Undercloud'] -%}
{{ hostvars.raw_get(host)['ansible_hostname'] }}:
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
{{ hostvars.raw_get(host)['ansible_hostname'] | lower}}:
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) | lower }}
ansible_become: false
ansible_connection: local



Loading…
Cancel
Save