Add manual nodes adding

This commit is contained in:
Андрей Лимачко 2022-04-29 03:12:14 +04:00
parent 5cbbf28001
commit c99f972b52

View File

@ -16,14 +16,22 @@
file: "conf/stacks/{{stack_name}}/stack.yml"
name: st
- set_fact:
gen_nodes: []
- name: nodes autogeneration
block:
- set_fact:
gen_nodes: []
- name: genrate nodes list
include_tasks: generate_nodes.yml
with_items: "{{st.nodes}}"
- name: genrate nodes list
include_tasks: generate_nodes.yml
with_items: "{{st.nodes}}"
- set_fact:
stack: "{{ {}|combine( st | combine({'nodes': gen_nodes|list_to_dict}) )|combine(as) }}"
# stack: "{{ {}|combine( st )|combine({'apps': as}) }}"
#- debug: msg="{{stack}}"
- set_fact:
stack: "{{ {}|combine( st | combine({'nodes': gen_nodes|list_to_dict}) )|combine(as) }}"
# stack: "{{ {}|combine( st )|combine({'apps': as}) }}"
when: st.nodes_autogen | default(True) | bool
- name: importing nodes
block:
- set_fact:
stack: "{{ {} | combine(st) | combine(as) }}"
when: not st.nodes_autogen | default(True) | bool