Giter VIP home page Giter VIP logo

Comments (6)

ansibullbot avatar ansibullbot commented on June 12, 2024

Files identified in the description:

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

from community.aws.

ansibullbot avatar ansibullbot commented on June 12, 2024

cc @jillr @s-hertel @tremble @wimnat
click here for bot help

from community.aws.

brsolomon-deloitte avatar brsolomon-deloitte commented on June 12, 2024

Still present with Ansible 2.9.23.

    - name: Destroy target group                                                                                        
      elb_target_group:                                                                                                 
        region: "{{ aws_region }}"                                                                                      
        name: "{{ aws_target_group_name }}-{{ k8s_cluster_id }}"                                                        
        state: absent                                                                                                   
        wait: true 
TASK [Destroy target group] **************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "target_type is instance but all of the following are missing: protocol, port, vpc_id"}

from community.aws.

ansibullbot avatar ansibullbot commented on June 12, 2024

cc @markuman
click here for bot help

from community.aws.

brsolomon-deloitte avatar brsolomon-deloitte commented on June 12, 2024

The issue seems to be at

module = AnsibleAWSModule(argument_spec=argument_spec,

    module = AnsibleAWSModule(argument_spec=argument_spec,
                              required_if=[
                                  ['target_type', 'instance', ['protocol', 'port', 'vpc_id']],
                                  ['target_type', 'ip', ['protocol', 'port', 'vpc_id']],
                              ]
                              )

where the required_if fails to account for the fact that ['protocol', 'port', 'vpc_id'] are not really required if state=absent (all that should be required in that case is name).

It doesn't look like required_if supports that additional level of logical complexity directly.

from community.aws.

tremble avatar tremble commented on June 12, 2024

@rwky Digging into this a little more, the issue was actually fixed by ansible/ansible#65201 however it wasn't backported to Ansible 2.9.

The latest version of Ansible is 2.11, with 2.12 due in a couple of weeks. As such Ansible 2.9 is no longer accepting most patches so you'll need to explicitly use the version of this module from the collections if you want the fix. https://docs.ansible.com/ansible/latest/user_guide/collections_using.html

This may mean you'll need to set the "collections" keyword, or refer to the module as "community.aws.elb_target_group" rather than just elb_target_group".

from community.aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.