Skip to content

Commit

Permalink
Fixed default file mode error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ernestoforeseemed committed Sep 16, 2021
1 parent 171ce2c commit bfb0ec9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand Down

0 comments on commit bfb0ec9

Please sign in to comment.