Skip to content

Commit fb00fb8

Browse files
committed
Update s3_account_apply.yml
1 parent f8bcca5 commit fb00fb8

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

ansible-fb/playbooks/s3_account_apply.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
account_name: "{{ account_name | mandatory }}"
1010

1111
tasks:
12-
- name: Ensure S3 object store account is present
13-
purestorage.flashblade.purefb_s3acc: >-
14-
{{
15-
_base | combine(_quota)
16-
}}
17-
vars:
18-
_base:
12+
- name: Build base module parameters
13+
ansible.builtin.set_fact:
14+
_params:
1915
name: "{{ account_name }}"
2016
state: present
2117
fb_url: "{{ fb_url }}"
2218
api_token: "{{ api_token }}"
23-
_quota: >-
24-
{{ {'quota': quota, 'hard_limit': hard_limit | bool}
25-
if quota is defined and quota not in [None, '', 'None', 'null']
26-
else {} }}
19+
20+
- name: Add quota and hard_limit if quota is specified
21+
ansible.builtin.set_fact:
22+
_params: "{{ _params | combine({'quota': quota, 'hard_limit': hard_limit | bool}) }}"
23+
when: quota is defined and quota not in [None, '', 'None', 'null']
24+
25+
- name: Ensure S3 object store account is present
26+
purestorage.flashblade.purefb_s3acc: "{{ _params }}"

0 commit comments

Comments
 (0)