-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of community modules without integration tests #988
Comments
Files identified in the description: If these files are inaccurate, please update the |
|
@marknet15 Yes, exactly. At the moment, I didn't link them because the _info modules were not really used by the non info counterparts. I think we should have a couple of tasks using the _info module at least. |
this is a very hard one, because there is no module to create a storage gateway yet. |
a few words more about the storage gateway (sgw). To deploy a storage gateway, you'll need to deploy an EC2 instance with a special ami. easy. - name: init sgw
block:
- name: get activation code
uri:
url: "http://{{ sgw_instance.instances[0].private_ip_address }}/?activationRegion={{ region }}"
method: GET
return_content: yes
register: ACTICATION_TOKEN
retries: 10
delay: 30
until: ACTICATION_TOKEN is not failed
- name: register new sgw
command: aws storagegateway activate-gateway \
--activation-key {{ ACTICATION_TOKEN.url.split('activationKey=')[-1] }} \
--gateway-name {{ sgw_name }} \
--gateway-timezone GMT+1:00 \
--gateway-region {{ region }} \
--gateway-type FILE_S3
- name: "list sgw: retries until gateway_operational_state is connected"
aws_sgw_info:
region: "{{ region }}"
gather_file_shares: yes
gather_local_disks: yes
gather_tapes: no
gather_volumes: no
register: sgwfacts
retries: 10
delay: 30
until: sgwfacts is not failed After the instance has bootet, it took 1-3 minutes until you can curl the registration code. For this the node that runs the integration test must be
To archive idempotent here, this block is only executed if the sgw isn't connected/available already - name: list sgw
aws_sgw_info:
region: "{{ region }}"
gather_file_shares: yes
gather_local_disks: yes
gather_tapes: no
gather_volumes: no
register: sgwfacts
- name: merge sgw names
set_fact:
sgws: "{{ sgwfacts.gateways | map(attribute='gateway_name') | list }}"
- include_tasks: init_sgw.yml
when: sgw_name not in sgws So at the end, to test - community.aws.sgw_activate_gateway:
name: "{{ sgw_name }}"
state: ['present','absent']
ip: 1.2.3.4 ...but it's also possible to glue everything with other modules together 😎 |
new module: cloudwatch_metric_alarm_info SUMMARY Depends-On: ansible-collections#1066 Should be merged only after ansible-collections#1028 is merged. Adding a new module for retrieving cloudwatch metric alarms info. Currently supports following boto API(s) describe_alarms() ISSUE TYPE New Module Pull Request COMPONENT NAME cloudwatch_metric_alarm_info ADDITIONAL INFORMATION Will be useful in moving these tasks from aws cli commands to amazon.aws module. https://github.com/ansible-collections/community.aws/blob/main/tests/integration/targets/cloudwatch_metric_alarm/tasks/main.yml#L63-L70 ansible-collections#1440 The integration tests for this info module will be added to above tests, after the cloudwatch_metric_alarm module is migrated from community.aws to amazon.aws. Sample playbook --- - name: Create a metric alarm & get info hosts: localhost gather_facts: false tasks: - name: create alarm community.aws.cloudwatch_metric_alarm: state: present region: us-east-2 name: "cpu-low-test-metric-alarm-1234" metric: "CPUUtilization" namespace: "AWS/EC2" statistic: Average comparison: "LessThanOrEqualToThreshold" threshold: 50.0 period: 180 evaluation_periods: 3 unit: "Percent" description: "This will alarm when a instance's CPU usage average is lower than 50%" dimensions: {'InstanceId':'i-00a8b34xxxxxxxxxx'} - name: describe the metric alarm based on metric name and namespace amazon.aws.cloudwatch_metric_alarm_info: alarm_names: - cpu-low-test-metric-alarm-1234 register: alarm_info - debug: var: alarm_info Reviewed-by: Alina Buzachis <None> Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Jill R <None> Reviewed-by: Mark Chappell <None> Reviewed-by: Gonéri Le Bouder <[email protected]>
Summary
The following modules do not have integrations tests:
Issue Type
Feature Idea
Component Name
Several modules
Additional Information
Code of Conduct
The text was updated successfully, but these errors were encountered: