template fix to avoid extra characters in vault policy
This commit is contained in:
parent
09d664dc09
commit
e37f334373
1 changed files with 6 additions and 6 deletions
|
@ -9,16 +9,16 @@
|
||||||
body_format: json
|
body_format: json
|
||||||
body:
|
body:
|
||||||
rules: >-
|
rules: >-
|
||||||
{%- if create_role_policy_rules|d("default") == "default" -%}
|
{%- if create_role_policy_rules|d("default") == "default" %}
|
||||||
{{
|
{{
|
||||||
{ 'path': {
|
{ 'path': {
|
||||||
'pki/issue/' + create_role_name: {'policy': 'write'},
|
'pki/issue/' + create_role_name: {'policy': 'write'},
|
||||||
'pki/roles/' + create_role_name: {'policy': 'read'}
|
'pki/roles/' + create_role_name: {'policy': 'read'}
|
||||||
}} | to_json + '\n'
|
}} | to_json
|
||||||
}}
|
}}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ create_role_policy_rules | to_json + '\n' }}
|
{{ create_role_policy_rules | to_json }}
|
||||||
{%- endif -%}
|
{%- endif %}
|
||||||
status_code: 204
|
status_code: 204
|
||||||
when: inventory_hostname == groups[create_role_group]|first
|
when: inventory_hostname == groups[create_role_group]|first
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
Loading…
Reference in a new issue