Browse Source

Use action plugin for all_nodes data

Update deploy_steps_playbook.yaml to use the new action plugin for
rendering the all_nodes data. The native python is much faster than the
jinja2 template:

Change-Id: I3ac05c30f7c5d136c5da9441faf7890cb6fb9d05
(cherry picked from commit c8dcce7089)
changes/23/705923/3
James Slagle 3 weeks ago
parent
commit
ab9f1c1a8b
1 changed files with 3 additions and 30 deletions
  1. +3
    -30
      common/deploy-steps.j2

+ 3
- 30
common/deploy-steps.j2 View File

@@ -451,16 +451,7 @@ outputs:
become: false
run_once: true
when: not ansible_check_mode|bool
block:
- name: Get current user
command: whoami
register: whoami
- name: render all_nodes data as group_vars for overcloud
template:
src: "{{ '{{' }} lookup('first_found', lookup('config', 'DEFAULT_ROLES_PATH') | map('regex_replace', '$', '/tripleo-hieradata') | list) ~ '/templates/all_nodes.j2' {{ '}}'}}"
dest: "{{ '{{' }} playbook_dir {{ '}}' }}/group_vars/overcloud.json"
owner: "{{ '{{' }} whoami.stdout {{ '}}' }}"
group: "{{ '{{' }} whoami.stdout {{ '}}' }}"
tripleo_all_nodes_data:
tags:
- facts

@@ -1077,16 +1068,7 @@ outputs:
become: false
run_once: true
when: not ansible_check_mode|bool
block:
- name: Get current user
command: whoami
register: whoami
- name: render all_nodes data as group_vars for overcloud
template:
src: "{{ '{{' }} lookup('first_found', lookup('config', 'DEFAULT_ROLES_PATH') | map('regex_replace', '$', '/tripleo-hieradata') | list) ~ '/templates/all_nodes.j2' {{ '}}'}}"
dest: "{{ '{{' }} playbook_dir {{ '}}' }}/group_vars/overcloud.json"
owner: "{{ '{{' }} whoami.stdout {{ '}}' }}"
group: "{{ '{{' }} whoami.stdout {{ '}}' }}"
tripleo_all_nodes_data:
tags:
- facts
- hosts: DEPLOY_TARGET_HOST
@@ -1186,16 +1168,7 @@ outputs:
become: false
run_once: true
when: not ansible_check_mode|bool
block:
- name: Get current user
command: whoami
register: whoami
- name: render all_nodes data as group_vars for overcloud
template:
src: "{{ '{{' }} lookup('first_found', lookup('config', 'DEFAULT_ROLES_PATH') | map('regex_replace', '$', '/tripleo-hieradata') | list) ~ '/templates/all_nodes.j2' {{ '}}'}}"
dest: "{{ '{{' }} playbook_dir {{ '}}' }}/group_vars/overcloud.json"
owner: "{{ '{{' }} whoami.stdout {{ '}}' }}"
group: "{{ '{{' }} whoami.stdout {{ '}}' }}"
tripleo_all_nodes_data:
tags:
- facts
- hosts: DEPLOY_TARGET_HOST

Loading…
Cancel
Save