ansible/test/legacy/roles/scaleway_s3/tasks/aws_s3_create.yml
Matt Clay b8f0cfc38a Move scaleway_s3 tests to the legacy directory.
These tests rely on the AWS S3 modules, but will not be migrated along with those modules into an AWS collection.

Since these tests will not reside in a collection alongside the modules under test they are being moved to the legacy tests directory.

The legacy tests directory will soon be migrated to a separate repository.
2020-02-18 13:02:51 -08:00

69 lines
1.5 KiB
YAML

- name: Create s3 bucket (Check)
check_mode: yes
aws_s3:
bucket: '{{ bucket_name }}'
mode: create
region: '{{ scaleway_region }}'
s3_url: '{{ s3_url }}'
encrypt: false
register: bucket_creation_check
- name: Show bucket_creation_check
debug:
var: bucket_creation_check
- name: bucket_creation_check is success
assert:
that:
- bucket_creation_check is success
- name: bucket_creation_check is changed
assert:
that:
- bucket_creation_check is changed
- name: Create s3 bucket
aws_s3:
bucket: '{{ bucket_name }}'
mode: create
region: '{{ scaleway_region }}'
s3_url: '{{ s3_url }}'
encrypt: false
register: bucket_creation
- name: Show bucket_creation
debug:
var: bucket_creation
- name: bucket_creation is success
assert:
that:
- bucket_creation is success
- name: bucket_creation is changed
assert:
that:
- bucket_creation is changed
- name: Create s3 bucket (Confirmation)
aws_s3:
bucket: '{{ bucket_name }}'
mode: create
region: '{{ scaleway_region }}'
s3_url: '{{ s3_url }}'
encrypt: false
register: bucket_creation_confirmation
- name: Show bucket_creation_confirmation
debug:
var: bucket_creation_confirmation
- name: bucket_creation_confirmation is success
assert:
that:
- bucket_creation_confirmation is success
- name: bucket_creation_confirmation is not changed
assert:
that:
- bucket_creation_confirmation is not changed