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

ACI: Adding an ACI connection plugin for communication #36100

Closed
dagwieers opened this issue Feb 13, 2018 · 15 comments
Closed

ACI: Adding an ACI connection plugin for communication #36100

dagwieers opened this issue Feb 13, 2018 · 15 comments
Assignees
Labels
aci Cisco ACI community affects_2.6 This issue/PR affects Ansible v2.6 cisco Cisco technologies docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. module This issue/PR relates to a module. networking Network category support:certified This issue/PR relates to certified code. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.

Comments

@dagwieers
Copy link
Contributor

dagwieers commented Feb 13, 2018

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ACI

ANSIBLE VERSION

v2.6

SUMMARY

The general idea is that the ACI modules would feel more native and better integrated with how Ansible works. This means that the information/credentials to connect to the APIC is stored in the inventory (using ansible_host, ansible_port, ansible_user and ansible_password) and the playbook tasks only take into account the parameters required for its specific use.

Other benefits of using an ACI connection plugin include:

  • It would manage the connection and could handle HTTP errors more gracefully
  • On connection problems it can rebuild the session transparantly
  • During maintenance or APIC cluster issues the connection plugin would switch between APICs (provides high-availability)
  • It would centralize connection information per node or per group, keeping credentials out of playbooks
  • It avoids too many consecutive auth API calls which may result in connection throttling and playbook failure

Currently we do:

- hosts: apic_cluster01
  tasks:
  - aci_tenant:
      hostname: 10.1.2.1
      username: admin
      password: SecretPassword
      tenant: customer-xyz
      description: Customer XYZ
      state: present

  - aci_vrf:
      hostname: 10.1.2.1
      username: admin
      password: SecretPassword
      tenant: customer-xyz
      vrf: lab
      description: Lab VRF
      policy_control_preference: enforced
      policy_control_direction: ingress

  - aci_bd:
      hostname: 10.1.2.1
      username: admin
      password: SecretPassword
      tenant: customer-xyz
      vrf: lab
      bd: app01
      enable_routing: yes

  - aci_bd_subnet:
      hostname: 10.1.2.1
      username: admin
      password: SecretPassword
      tenant: customer-xyz
      bd: app01
      gateway: 10.10.10.1
      mask: 24
      scope: private
...

A typical playbook would then look much more concise and readable:

- hosts: apic_cluster01
  tasks:
  - aci_tenant:
      tenant: customer-xyz
      description: Customer XYZ
      state: present

  - aci_vrf:
      tenant: customer-xyz
      vrf: lab
      description: Lab VRF
      policy_control_preference: enforced
      policy_control_direction: ingress

  - aci_bd:
      tenant: customer-xyz
      vrf: lab
      bd: app01
      enable_routing: yes

  - aci_bd_subnet:
      tenant: customer-xyz
      bd: app01
      gateway: 10.10.10.1
      mask: 24
      scope: private
...

The inventory for an ACI cluster would then look like:

all:
    apic_cluster01:
        ansible_host: [ 10.1.2.1, 10.1.2.2, 10.1.2.3 ]
        ansible_connection: aci
        ansible_user: admin
        ansible_password: SuperSecret
        proxy_env:
          http_proxy: http://proxy.example.com:8080

This relates to #33887

@dagwieers dagwieers added the aci Cisco ACI community label Feb 13, 2018
@dagwieers dagwieers added this to the 2.6.0 milestone Feb 13, 2018
@dagwieers dagwieers self-assigned this Feb 13, 2018
@ansibot

This comment has been minimized.

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 feature_idea support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 13, 2018
This was referenced Feb 13, 2018
@ansibot
Copy link
Contributor

ansibot commented Mar 1, 2018

cc @gdpak
click here for bot help

@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_idea labels Mar 2, 2018
@dagwieers dagwieers modified the milestones: 2.6.0, 2.7.0 May 9, 2018
@ansibot ansibot added the networking Network category label May 25, 2018
@dagwieers dagwieers mentioned this issue May 30, 2018
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jun 8, 2018
@Gittins
Copy link
Contributor

Gittins commented Jul 23, 2018

Hi, Is there any update on when it's likely that this feature/functionality will be committed in?

@ansibot
Copy link
Contributor

ansibot commented Aug 24, 2018

@dagwieers
Copy link
Contributor Author

We are waiting for a clear roadmap for the httpapi framework, which at this point lacks documentation or code-annotations, and it is unclear how this ought to be extended by contributors.
This is going to be discussed at AnsibleFest 2018 in Austin AFAICT.

@ansibot
Copy link
Contributor

ansibot commented Sep 26, 2018

@ansibot ansibot added docs This issue/PR relates to or includes documentation. test This PR relates to tests. labels Sep 26, 2018
@ansibot ansibot added the docsite This issue/PR relates to the documentation website. label Nov 10, 2018
@dagwieers dagwieers added the cisco Cisco technologies label Feb 22, 2019
@ansibot
Copy link
Contributor

ansibot commented Mar 2, 2019

@gundalow gundalow removed this from the 2.7.0 milestone Mar 5, 2019
@ansibot
Copy link
Contributor

ansibot commented Mar 21, 2019

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

@ansibot ansibot added the module This issue/PR relates to a module. label Mar 21, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 1, 2019

@fhlmbrg
Copy link
Contributor

fhlmbrg commented Jun 26, 2019

This feature would be very useful. We ran into this issue yesterday on 3.2(2l) when doing a mass BD update using the aci_bd module. Had to apply a delay factor to not hit the REST API auth calls limit.

@AlyAwad
Copy link

AlyAwad commented Jun 26, 2019

Any update on this yet ?
Even if there is no dedicated ACI connection type can the modules simply use the variables defined in the inventory file by default
all:
hosts:
apic1:
ansible_host: apic1.com
ansible_user: username
ansible_password: password
ansible_connection: local
ansible_use_proxy: no
ansible_validate_certs: no

It can be even more generic for any module where any variables defined in the inventory file using the special "ansible_variable" keyword is used by the module directly as default

@ansibot ansibot added the has_pr This issue has an associated PR. label Jul 28, 2019
@ansibot
Copy link
Contributor

ansibot commented Feb 16, 2020

@ansibot
Copy link
Contributor

ansibot commented Mar 28, 2020

Files identified in the description:

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

click here for bot help

@ansibot ansibot added support:certified This issue/PR relates to certified code. support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed support:community This issue/PR relates to code supported by the Ansible community. labels Mar 28, 2020
@aciguru
Copy link
Contributor

aciguru commented Apr 14, 2020

Moved to

CiscoDevNet/ansible-aci#25

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aci Cisco ACI community affects_2.6 This issue/PR affects Ansible v2.6 cisco Cisco technologies docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. module This issue/PR relates to a module. networking Network category support:certified This issue/PR relates to certified code. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

No branches or pull requests

7 participants