From 401c89efebaa5a5b09fd19f0969ed8b6d893e9a1 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Thu, 12 Dec 2024 15:25:54 -0500 Subject: [PATCH 1/2] Update version of the AWS Collection --- .github/workflows/integration-tests-pr.yml | 9 +-------- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-smoke-tests.yml | 2 +- .github/workflows/release.yml | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/integration-tests-pr.yml b/.github/workflows/integration-tests-pr.yml index e10b9145..19743f0f 100644 --- a/.github/workflows/integration-tests-pr.yml +++ b/.github/workflows/integration-tests-pr.yml @@ -39,13 +39,6 @@ jobs: fetch-depth: 0 submodules: 'recursive' - # Install deps - - name: update packages - run: sudo apt-get update -y - - - name: install make - run: sudo apt-get install -y build-essential - - name: setup python 3 uses: actions/setup-python@v5 with: @@ -55,7 +48,7 @@ jobs: run: make deps - name: install ansible dependencies - run: ansible-galaxy collection install amazon.aws:==6.0.1 + run: ansible-galaxy collection install amazon.aws:==9.1.0 - name: install collection run: make install diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 49fbfb0b..051ea283 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -52,7 +52,7 @@ jobs: run: make deps - name: Install ansible dependencies - run: ansible-galaxy collection install amazon.aws:==6.0.1 + run: ansible-galaxy collection install amazon.aws:==9.1.0 - name: Install Collection run: make install diff --git a/.github/workflows/nightly-smoke-tests.yml b/.github/workflows/nightly-smoke-tests.yml index da150285..888aae95 100644 --- a/.github/workflows/nightly-smoke-tests.yml +++ b/.github/workflows/nightly-smoke-tests.yml @@ -40,7 +40,7 @@ jobs: run: make deps - name: Install ansible dependencies - run: ansible-galaxy collection install amazon.aws:==6.0.1 + run: ansible-galaxy collection install amazon.aws:==9.1.0 - name: Install Collection run: make install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 785c5993..f5cd811b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: run: make deps - name: install ansible dependencies - run: ansible-galaxy collection install amazon.aws:==6.0.1 + run: ansible-galaxy collection install amazon.aws:==9.1.0 - name: inject docs using specdoc run: make inject From 11c07676226ecf6276fd03835cceb1c2d2637795 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Thu, 12 Dec 2024 15:47:43 -0500 Subject: [PATCH 2/2] Update obj tests --- .../obj_static_site/roles/static_site/tasks/main.yml | 7 ++++--- tests/integration/targets/object_basic/tasks/main.yaml | 10 +++++++--- .../targets/object_keys_basic/tasks/main.yaml | 10 +++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/examples/obj_static_site/roles/static_site/tasks/main.yml b/examples/obj_static_site/roles/static_site/tasks/main.yml index 6e0b2c7d..68a62ee0 100644 --- a/examples/obj_static_site/roles/static_site/tasks/main.yml +++ b/examples/obj_static_site/roles/static_site/tasks/main.yml @@ -12,15 +12,15 @@ - name: Create an Object Storage bucket amazon.aws.s3_bucket: name: "{{ bucket_name }}" - s3_url: "https://{{ cluster_info.clusters[0].domain }}/" + endpoint_url: "https://{{ cluster_info.clusters[0].domain }}/" aws_access_key: "{{ obj_key.key.access_key }}" aws_secret_key: "{{ obj_key.key.secret_key }}" state: present - name: Upload the static site files - amazon.aws.aws_s3: - s3_url: "https://{{ cluster_info.clusters[0].domain }}/" + amazon.aws.s3_object: + endpoint_url: "https://{{ cluster_info.clusters[0].domain }}/" aws_access_key: "{{ obj_key.key.access_key }}" aws_secret_key: "{{ obj_key.key.secret_key }}" @@ -29,6 +29,7 @@ src: "{{ item }}" mode: put permission: public-read + ceph: true with_fileglob: 'roles/static_site/files/public/*.html' - name: Configure the Object Storage Bucket as a website with index and error pages diff --git a/tests/integration/targets/object_basic/tasks/main.yaml b/tests/integration/targets/object_basic/tasks/main.yaml index 9cf48616..b4e3f052 100644 --- a/tests/integration/targets/object_basic/tasks/main.yaml +++ b/tests/integration/targets/object_basic/tasks/main.yaml @@ -39,10 +39,12 @@ - name: Create an S3 bucket amazon.aws.s3_bucket: - s3_url: 'http://{{ info_by_id.clusters[0].domain }}/' + endpoint_url: 'https://{{ info_by_id.clusters[0].domain }}/' aws_access_key: '{{ create_key.key.access_key }}' aws_secret_key: '{{ create_key.key.secret_key }}' name: 'test-ansible-bucket-{{ r }}' + ceph: true + region: "default" state: present register: create_bucket @@ -77,14 +79,16 @@ - create_access.key.bucket_access[1].permissions == 'read_only' always: - - ignore_errors: yes + - ignore_errors: true block: - name: Delete the S3 bucket amazon.aws.s3_bucket: - s3_url: 'http://{{ info_by_id.clusters[0].domain }}/' + endpoint_url: 'https://{{ info_by_id.clusters[0].domain }}/' aws_access_key: '{{ create_key.key.access_key }}' aws_secret_key: '{{ create_key.key.secret_key }}' name: '{{ create_bucket.name }}' + ceph: true + region: "default" state: absent register: delete_bucket diff --git a/tests/integration/targets/object_keys_basic/tasks/main.yaml b/tests/integration/targets/object_keys_basic/tasks/main.yaml index b40fd7c7..fabff4e9 100644 --- a/tests/integration/targets/object_keys_basic/tasks/main.yaml +++ b/tests/integration/targets/object_keys_basic/tasks/main.yaml @@ -58,11 +58,13 @@ - name: Create an S3 bucket using the key amazon.aws.s3_bucket: - s3_url: "https://{{ update.key.regions[0].s3_endpoint }}/" + endpoint_url: "https://{{ update.key.regions[0].s3_endpoint }}/" aws_access_key: "{{ create.key.access_key }}" aws_secret_key: "{{ create.key.secret_key }}" name: "test-ansible-bucket-{{ r }}" state: present + ceph: true + region: "default" register: create_bucket - name: Assert bucket was created @@ -137,14 +139,16 @@ failed_when: "'`access` is not an updatable field' not in update_scoped.msg" always: - - ignore_errors: yes + - ignore_errors: true block: - name: Delete the OBJ bucket amazon.aws.s3_bucket: - s3_url: "https://{{ update.key.regions[0].s3_endpoint }}//" + endpoint_url: "https://{{ update.key.regions[0].s3_endpoint }}//" aws_access_key: "{{ create.key.access_key }}" aws_secret_key: "{{ create.key.secret_key }}" name: "{{ create_bucket.name }}" + ceph: true + region: "default" state: absent register: delete_bucket