blob: 4a6eec61488355839b287bfdc1c5529f9c039d23 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
- hosts: localhost
tasks:
- name: Delete container/Filesystem on ADLS Gen2
azure_rm_storageblob:
resource_group: "{{ resource_group }}"
storage_account_name: "{{ item.split('@')[1].split('.')[0] }}"
container: "{{ item.split('@')[0].split('://')[1] }}"
state: absent
force: yes
loop:
"{{ instance_volumes_adls.split(',') }}"
when: cluster_type == 'azure' and use_adlsg2
- name: Create container/Filesystem on ADLS Gen2
azure_rm_storageblob:
resource_group: "{{ resource_group }}"
storage_account_name: "{{ item.split('@')[1].split('.')[0] }}"
container: "{{ item.split('@')[0].split('://')[1] }}"
retries: 20
delay: 30
register: result
until: result is succeeded and (not result.changed or (result.changed and result.container|length > 0))
loop:
"{{ instance_volumes_adls.split(',') }}"
when: cluster_type == 'azure' and use_adlsg2