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:
|
||||
rules: >-
|
||||
{%- if create_role_policy_rules|d("default") == "default" -%}
|
||||
{%- if create_role_policy_rules|d("default") == "default" %}
|
||||
{{
|
||||
{ 'path': {
|
||||
'pki/issue/' + create_role_name: {'policy': 'write'},
|
||||
'pki/roles/' + create_role_name: {'policy': 'read'}
|
||||
}} | to_json + '\n'
|
||||
'pki/issue/' + create_role_name: {'policy': 'write'},
|
||||
'pki/roles/' + create_role_name: {'policy': 'read'}
|
||||
}} | to_json
|
||||
}}
|
||||
{%- else -%}
|
||||
{{ create_role_policy_rules | to_json + '\n' }}
|
||||
{%- endif -%}
|
||||
{{ create_role_policy_rules | to_json }}
|
||||
{%- endif %}
|
||||
status_code: 204
|
||||
when: inventory_hostname == groups[create_role_group]|first
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
|
Loading…
Reference in a new issue