Skip to content
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

route53_health_check resource_path uniqueness ignored #88

Closed
sydoluciani opened this issue Jun 5, 2020 · 1 comment · Fixed by #1143
Closed

route53_health_check resource_path uniqueness ignored #88

sydoluciani opened this issue Jun 5, 2020 · 1 comment · Fixed by #1143
Assignees
Labels
affects_2.10 bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution waiting_on_contributor Needs help. Feel free to engage to get things unblocked

Comments

@sydoluciani
Copy link

SUMMARY

Moving issue from ansible repository to community.aws collections.
Tried to create multiple route53 healthchecks to the same server but different resource paths using with_items . Instead of creating one health check for each resource path, only the first is created.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
ansible 2.2.2.0
STEPS TO REPRODUCE
- name: set up route53 health checks
  connection: local
  become: false
  route53_health_check:
    failure_threshold: 3
    ip_address: '{{ ip_address }}'
    port: 80
    request_interval: 30
    resource_path: '{{ item }}'
    state: present
    type: HTTP
  register: result
  with_items:
    - /some_status1
    - /other_status2
EXPECTED RESULTS

2 health checks created
result contains health_check.ids for each health check

ACTUAL RESULTS

1 health check created
result contains two items, both having the same health_check.id


@ansibullbot
Copy link

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug needs_triage labels Aug 19, 2020
@goneri goneri added waiting_on_contributor Needs help. Feel free to engage to get things unblocked easyfix Good for new comers and easy to start with contribution and removed needs_triage labels Feb 3, 2021
@mandar242 mandar242 self-assigned this May 6, 2022
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
…nsible-collections#88)

* allow integer and bool values for filtering images
* Update changelogs/fragments/28-ec2_ami_info_int_bool_filter.yml
* add unit tests for ansible_dict_to_boto3_filter_list, put ec2_ami_info integration tests in ec2_ami target
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jul 7, 2022
…thout updating existing health check (#1143) (#1324)

[PR #1143/8d3fec8e backport][stable-4] route53_health_check: Add feature to create multiple health checks without updating existing health check

This is a backport of PR #1143 as merged into main (8d3fec8).
SUMMARY

Might fix #88


Update [06/30/2022]:
This PR adds three new parameters to route53_health_check module.
health_check_id=dict(type='str', aliases=['id'], required=False),
health_check_name=dict(type='str', aliases=['name'], required=False),
use_unique_names=dict(type='bool', required=False),


health_check_id (alias id): when set, can be used to update and also delete health checks.
use_unique_names and health_check_name (alias name): these are used together to make use of health check name as a unique identifier to create/update/delete health check and also assign a name to the health check.


Update [05/20/2022]:
Based on discussion between 15 May to 19 May below, the approach of adding ignore_existing parameter has been discarded for the time being.
The progress on this WIP PR put on hold until route53_info return value issue gets resolved. #1236

Added parameter ignore_existing that allows to create multiple route53 healthchecks with similar parameters instead of updating existing healthcheck (example: create multiple route53 healthchecks with different paths to same server).
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

route53_health_check
ADDITIONAL INFORMATION


Consider following example from the issue.

- name: set up route53 health checks
  connection: local
  become: false
  route53_health_check:
    failure_threshold: 3
    ip_address: '{{ ip_address }}'
    port: 80
    request_interval: 30
    resource_path: '{{ item }}'
    state: present
    type: HTTP
    #ignore_existing: True
  register: result
  with_items:
    - /some_status1
    - /other_status2

With ignore_exisitng parameter, it will create two healthchecks to same sever with different resource_path.
Without ignore_existing parameter, it will create first healthcheck to sever, then start creating the second healthcheck but as it's having same server/ip_address, it updates the existing healthcheck instead, so creates only single healthcheck at the end of the task.

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
4 participants