File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
automation/roles/consul/tasks Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 3434 dest : " {{ config_item.dest }}"
3535 owner : " {{ consul_user }}"
3636 group : " {{ consul_group }}"
37- content : " {{ _consul_json_config | to_nice_json }}"
37+ content : " {{ lookup('template', consul_config_template_path, convert_data=False) | from_json | to_nice_json }}"
3838 mode : " 0600"
39- vars :
40- _consul_json_config : " {{ lookup('template', consul_config_template_path, convert_data=False) | from_json }}"
4139 loop :
4240 - dest : " {{ consul_config_path }}/config.json"
4341 config_version : " {{ consul_node_role }}"
6462 dest : " {{ consul_configd_path }}/50custom.json"
6563 owner : " {{ consul_user }}"
6664 group : " {{ consul_group }}"
67- content : " {{ _consul_custom_config | to_nice_json }}"
65+ content : " {{ lookup('template', 'templates/configd_50custom.json.j2', convert_data=False) | from_json | to_nice_json }}"
6866 mode : " 0600"
69- vars :
70- _consul_custom_config : " {{ lookup('template', 'templates/configd_50custom.json.j2', convert_data=False) | from_json }}"
7167 when :
7268 - consul_config_custom is defined
7369 notify :
Original file line number Diff line number Diff line change 44- name : Create configuration
55 ansible.windows.win_copy :
66 dest : " {{ config_item.dest }}"
7- content : " {{ _consul_json_config | to_nice_json }}"
8- vars :
9- _consul_json_config : " {{ lookup('template', consul_config_template_path, convert_data=False) | from_json }}"
7+ content : " {{ lookup('template', consul_config_template_path, convert_data=False) | from_json | to_nice_json }}"
108 loop :
119 - dest : " {{ consul_config_path }}/config.json"
1210 config_version : " {{ consul_node_role }}"
3028- name : Create custom configuration
3129 ansible.windows.win_copy :
3230 dest : " {{ consul_configd_path }}/50custom.json"
33- content : " {{ _consul_custom_config | to_nice_json }}"
34- vars :
35- _consul_custom_config : " {{ lookup('template', 'templates/configd_50custom.json.j2', convert_data=False) | from_json }}"
31+ content : " {{ lookup('template', 'templates/configd_50custom.json.j2', convert_data=False) | from_json | to_nice_json }}"
3632 when :
3733 - consul_config_custom is defined
3834 notify :
You can’t perform that action at this time.
0 commit comments