From bfb0ec9be05f02b6711873edba5646b7de911e8b Mon Sep 17 00:00:00 2001 From: Ernesto Ruy Sanchez Date: Wed, 15 Sep 2021 19:50:35 -0700 Subject: [PATCH] Fixed default file mode error This change fixes the following error: fatal: [local]: FAILED! => {"msg": "template error while templating string: expected token ',', got 'integer'. String: {{ item.mode | default(0750) }}"} Signed-off-by: Ernesto Ruy Sanchez --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index fc2d05c..143d436 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -90,7 +90,7 @@ path: "{{ item.home }}" owner: root group: "{{ item.group | default(sftp_group_name) }}" - mode: "{{ item.mode | default(0750) }}" + mode: "{{ item.mode | default('0750') }}" with_items: "{{ _sftp_users }}" # Install all relevant public keys. @@ -118,7 +118,7 @@ path: "{{ item[0].home }}/{{ item[1].name | default(item[1]) }}" owner: "{{ item[0].name }}" group: "{{ item[0].group | default(item[0].name) }}" - mode: "{{ item[1].mode | default(0750) }}" + mode: "{{ item[1].mode | default('0750') }}" state: directory with_nested: - "{{ _sftp_users }}" @@ -130,7 +130,7 @@ path: "{{ item[0].home }}/{{ item[1].name | default(item[1]) }}" owner: "{{ item[0].name }}" group: "{{ item[0].group | default(item[0].name) }}" - mode: "{{ item[1].mode | default(0750) }}" + mode: "{{ item[1].mode | default('0750') }}" state: directory with_subelements: - "{{ _sftp_users }}"