diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 6bcf0ebcd7..2d0b1a4002 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -215,18 +215,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: diff --git a/common/generate-config-tasks.yaml b/common/generate-config-tasks.yaml index a48e47cb8b..f3d8120097 100644 --- a/common/generate-config-tasks.yaml +++ b/common/generate-config-tasks.yaml @@ -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" diff --git a/common/host-container-puppet-tasks.yaml b/common/host-container-puppet-tasks.yaml index a5ed8e6199..969d44feb7 100644 --- a/common/host-container-puppet-tasks.yaml +++ b/common/host-container-puppet-tasks.yaml @@ -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" diff --git a/deployment/haproxy/haproxy-public-tls-inject.yaml b/deployment/haproxy/haproxy-public-tls-inject.yaml index 33c13fb928..8d4c540d41 100644 --- a/deployment/haproxy/haproxy-public-tls-inject.yaml +++ b/deployment/haproxy/haproxy-public-tls-inject.yaml @@ -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 diff --git a/deployment/octavia/octavia-deployment-config.j2.yaml b/deployment/octavia/octavia-deployment-config.j2.yaml index fa48aaf677..7286658826 100644 --- a/deployment/octavia/octavia-deployment-config.j2.yaml +++ b/deployment/octavia/octavia-deployment-config.j2.yaml @@ -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