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

DNS Auth NSG Support for Bloxone Ansible v2 #43

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from

Conversation

AnilGadiyarHJ
Copy link
Collaborator

No description provided.

@AnilGadiyarHJ AnilGadiyarHJ marked this pull request as ready for review November 19, 2024 12:01
@AnilGadiyarHJ AnilGadiyarHJ requested a review from unasra November 27, 2024 06:11
plugins/modules/dns_auth_nsg_info.py Outdated Show resolved Hide resolved
plugins/modules/dns_auth_nsg_info.py Outdated Show resolved Hide resolved
tests/integration/targets/dns_auth_nsg/tasks/main.yml Outdated Show resolved Hide resolved
plugins/modules/dns_auth_nsg.py Outdated Show resolved Hide resolved
auth_nsg_name: "test-auth-nsg-{{ 999999 | random | string }}"
secondary_auth_nsg_name: "test-secondary-auth-nsg-{{ 999999 | random | string }}"

# - name: Create an Auth NSG (check mode)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this code commented out ?

- secondary_auth_nsg_info.objects | length == 1
- secondary_auth_nsg_info.objects[0].nsgs | length == 1
- secondary_auth_nsg_info.objects[0].nsgs[0] == auth_nsg.id
- block: # Unlinking block
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Unlinking is quite unnecessary . If the the unlinking is performed because it's interfering with the deletion of the primary object , why not delete the secondary object first in the always section and then cleanup the Primary.

# - auth_nsg_info.objects[0].id == auth_nsg.id
# - auth_nsg_info.objects[0].tags.location == "site-1"

- name: Create the Primary Auth NSG
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use Primary NSG to be the one that is created using the task with Tags above , no need to create an additional NSG !

type: "primary"
state: "present"
tags:
location: "my-location"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
location: "my-location"
location: "site-1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants