Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1565

[amazon.aws/2110] backup_plan: fix usage for advanced_backup_settings param

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      https://github.com/ansible-collections/amazon.aws/issues/2110

          1. Summary

      The module `amazon.aws.backup_plan` does not provide example of usage `advanced_backup_settings` and `advanced_backup_settings.backup_options` param.
      Also looking at the argspec for the option, not sure if it will work as expected because it's expecting a dict but I what actually gets passed is a string.

      https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/backup_plan.py#L151-L156
      https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/backup_plan.py#L383-L393

          1. Issue Type

      Bug Report

          1. Component Name

      backup_plan

          1. Ansible Version

      ```console (paste below)
      $ ansible --version

      ansible [core 2.15.5]
      ```

          1. Collection Versions

      ```console (paste below)
      $ ansible-galaxy collection list
      amazon.aws 9.0.0-dev0a
      ```

          1. AWS SDK versions

      ```console (paste below)
      $ pip show boto boto3 botocore
      Name: boto3
      Version: 1.28.15

      Name: botocore
      Version: 1.31.54
      ```

          1. Configuration

      ```console (paste below)
      $ ansible-config dump --only-changed

      ```

          1. OS / Environment

      No response

          1. Steps to Reproduce

      <!--- Paste example playbooks or commands between quotes below -->
      ```yaml (paste below)

      • name: Example for amazon.aws.backup_plan
        hosts: localhost
        gather_facts: false
        tasks:
      • name: Create a backup plan
        amazon.aws.backup_plan:
        state: present
        backup_plan_name: my-test-backup-plan1
        advanced_backup_settings:
      • resource_type: EC2
        backup_options: {"WindowsVSS": "enabled"}

        tags:
        TagKey1: TagValue1
        TagKey2: TagValue2
        rules:

      • rule_name: present
        target_backup_vault_name: my-test-vault
        schedule_expression: 'cron(0 5 ? * * *)'
        lifecycle:
        move_to_cold_storage_after_days: 1
        delete_after_days: 91
        recovery_point_tags:
        Key1: Value1
        Key2: Value2
        copy_actions:
      • destination_backup_vault_arn: arn:aws:backup:us-west-2:123456789:backup-vault:my-test-vault
        lifecycle:
        move_to_cold_storage_after_days: 1
        delete_after_days: 91
        register: create_result
        ```
        Create a backup_plan using the option similar to above
          1. Expected Results

      The usage of param is advanced_backup_settings verified and fixed if required.

          1. Actual Results

      ```console (paste below)

      ```

          1. Code of Conduct
      • [X] I agree to follow the Ansible Code of Conduct

            gosriniv@redhat.com Gomathi selvi Srinivasan
            jrouleau Jill Rouleau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: