diff --git a/roles/vault/tasks/shared/create_role.yml b/roles/vault/tasks/shared/create_role.yml index 1ab27ec37..59a23eccb 100644 --- a/roles/vault/tasks/shared/create_role.yml +++ b/roles/vault/tasks/shared/create_role.yml @@ -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 }}"