pytoccaz.azure_cli.az_storage_blob_download (1.0.0) — module

Downloads a blob from an azure storage container

| "added in version" 1.0.0 of pytoccaz.azure_cli"

Authors: Olivier Bernard (@pytoccaz)

Install collection

Install with ansible-galaxy collection install pytoccaz.azure_cli:==1.0.0


Add to requirements.yml

  collections:
    - name: pytoccaz.azure_cli
      version: 1.0.0

Description

Downloads a blob from an azure storage container with the C(az storage blob download) command

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Download NOTICE file from test container
  pytoccaz.azure_cli.az_storage_blob_download:
    container: test
    account_name: account000
    blob_name: NOTICE.txt
    output_file: NOTICE.txt
  register: command

Inputs

    
file:
    aliases:
    - output
    - output_file
    description: 'Path of file to write out to

      '
    required: true
    type: str

name:
    aliases:
    - blob
    - blob_name
    description: 'The blob name to download

      '
    required: true
    type: str

chgdir:
    aliases:
    - change_directory
    - change_dir
    - wkdir
    - working_directory
    - working_dir
    - output_directory
    - output_dir
    description: 'If given, working directory to run the command inside

      '
    type: str

overwrite:
    default: true
    description: 'Overwrite an existing file

      '
    type: bool

account_key:
    aliases:
    - key
    description: 'Storage account key

      '
    type: str

account_name:
    aliases:
    - account
    description: 'Storage account name

      '
    type: str

blob_endpoint:
    aliases:
    - endpoint
    description: 'Storage data service endpoint. Must be used in conjunction with storage
      account key

      '
    type: str

container_name:
    aliases:
    - container
    description: 'The container name

      '
    required: true
    type: str

connection_string:
    description: 'Storage account connection string

      '
    type: str

Outputs

result:
  description: 'A blob dictionary

    '
  returned: success
  sample:
    container: backups
    creationTime: '2023-12-04T23:00:05+00:00'
    name: test.tar.gz
  type: dict