From d0debc5004f0abc3f68533351250035704a95a77 Mon Sep 17 00:00:00 2001 From: Jeenitkumar Khatri <58591067+JkhatriInfobox@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:05:07 +0530 Subject: [PATCH] Fix ansible-lint issue and update CI workflow for Python setup (#264) * [FIX] Ansible-lint issues * [IMP] Updated github workflow file --- .github/workflows/ansible-test.yml | 14 ++--- changelogs/changelog.yaml | 61 +++++++++---------- .../229-handle-host-rename-without-dns.yml | 5 +- playbooks/create_extensible_attribute.yaml | 22 +++---- playbooks/create_nsgroup_delegation.yml | 6 +- playbooks/create_nsgroup_forwardingmember.yml | 6 +- .../create_nsgroup_forwardstubserver.yml | 6 +- playbooks/create_nsgroup_stubmember.yml | 6 +- .../nios_extensible_attribute/meta/main.yaml | 1 + .../nios_extensible_attribute/tasks/main.yaml | 4 +- .../tasks/nios_extensible_attribute.yaml | 37 +++++------ .../tasks/nios_host_record_idempotence.yml | 4 +- .../defaults/main.yaml | 2 +- .../nios_nsgroup_delegation/meta/main.yaml | 3 +- .../nios_nsgroup_delegation/tasks/main.yml | 4 +- .../nios_nsgroup_delegation_idempotence.yml | 30 ++++----- .../defaults/main.yaml | 2 +- .../meta/main.yaml | 3 +- .../tasks/main.yml | 4 +- ...s_nsgroup_forwardingmember_idempotence.yml | 30 ++++----- .../defaults/main.yaml | 2 +- .../meta/main.yaml | 3 +- .../tasks/main.yml | 4 +- ..._nsgroup_forwardstubserver_idempotence.yml | 30 ++++----- .../defaults/main.yaml | 2 +- .../nios_nsgroup_stubmember/meta/main.yaml | 3 +- .../nios_nsgroup_stubmember/tasks/main.yml | 4 +- .../nios_nsgroup_stubmember_idempotence.yml | 30 ++++----- 28 files changed, 175 insertions(+), 153 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 28a26681..d6b6d44e 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -16,10 +16,10 @@ jobs: ansible-version: [stable-2.15] steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python 3.11 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.11' @@ -66,7 +66,7 @@ jobs: steps: - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -131,12 +131,12 @@ jobs: python-version: '3.12' steps: - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install ansible-base (${{ matrix.ansible-version }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check @@ -170,7 +170,7 @@ jobs: run: ansible-test coverage xml -v --requirements --group-by command --group-by version working-directory: /home/runner/.ansible/collections/ansible_collections/infoblox/nios_modules/ - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 with: fail_ci_if_error: false @@ -191,7 +191,7 @@ jobs: steps: - name: Set up Python 3.11 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: # it is just required to run that once as "ansible-test sanity" in the docker image # will run on all python versions it supports. diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 056bf800..cf9803fe 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -3,9 +3,8 @@ ancestor: releases: 1.0.0: changes: - release_summary: "First release of the `nios_modules` collection! This release includes multiple plugins:- an - `api` plugin, a `network` plugin, a `nios` plugin, a `nios_inventory` plugin, a `lookup plugin`, - a `nios_next_ip` plugin, a `nios_next_network` plugin " + release_summary: "First release of the `nios_modules` collection! This release includes multiple plugins:- an `api` plugin, a `network` plugin, a `nios` + plugin, a `nios_inventory` plugin, a `lookup plugin`, a `nios_next_ip` plugin, a `nios_next_network` plugin " modules: - description: Configure Infoblox NIOS A records name: nios_a_record @@ -114,8 +113,8 @@ releases: - Sanity fixes as per Ansible guidelines to all modules minor_changes: - The modules are standardized as per Ansible guidelines - release_summary: Support for creating IPv6 Fixed Address with DUID, Support added to return the next available IP address - for an IPv6 network, Modules made compatible to work with ansible-core 2.11, Issue fixes and standardization of modules as per Ansible guidelines + release_summary: Support for creating IPv6 Fixed Address with DUID, Support added to return the next available IP address for an IPv6 network, Modules + made compatible to work with ansible-core 2.11, Issue fixes and standardization of modules as per Ansible guidelines release_date: "2021-09-07" 1.1.2: changes: @@ -125,8 +124,8 @@ releases: minor_changes: - Changes in inventory and lookup plugins documentation `#85 `_ - Directory restructure and added integration & unit tests `#87 `_ - release_summary: Issue fixes and standardization of inventory plugin and lookup modules as per Ansible guidelines, - Directory restructure and added integration & unit tests + release_summary: Issue fixes and standardization of inventory plugin and lookup modules as per Ansible guidelines, Directory restructure and added + integration & unit tests release_date: "2021-10-12" 1.2.0: changes: @@ -135,11 +134,10 @@ releases: - Ansible playbook fails to update canonical name of CName Record `#97 `_ minor_changes: - Updated 'required' field in modules `#99 `_ - - Following options are made required in the modules - | Record | Option made required | | ------ | -------------------- | | A | ipv4addr | | AAAA | ipv6addr| - | CNAME | canonical | | MX | mail_exchanger, preference | | PTR | ptrdname | - release_summary: Issue fixes to update A Record using `next_available_ip` function, Added a new feature - - Update canonical name of the CNAME Record, Updated the `required` fields in modules + - Following options are made required in the modules | Record | Option made required | | ------ | -------- | | A | ipv4addr | | AAAA | ipv6addr| | CNAME + | canonical | | MX | mail_exchanger, preference | | PTR | ptrdname | + release_summary: Issue fixes to update A Record using `next_available_ip` function, Added a new feature - Update canonical name of the CNAME Record, + Updated the `required` fields in modules release_date: "2021-12-13" 1.2.1: changes: @@ -161,20 +159,20 @@ releases: 1.3.0: changes: major_changes: - - Update operation using `old_name` and `new_name` for the object with dummy name in `old_name` - (which does not exist in system) will not create a new object in the system. An error will be thrown stating the object does not exist in the - system `#129 `_ + - Update operation using `old_name` and `new_name` for the object with dummy name in `old_name` (which does not exist in system) will not create a + new object in the system. An error will be thrown stating the object does not exist in the system + `#129 `_ - Update `text` field of TXT Record `#128 `_ bugfixes: - Fix to create TXT record with equals sign `#128 `_ - release_summary: Issue fixes to create TXT record with equals sign, For nonexistent record, update operation - creates the new record, For nonexistent IPv4Address, update operation creates a new A record with new_ipv4addr + release_summary: Issue fixes to create TXT record with equals sign, For nonexistent record, update operation creates the new record, For nonexistent + IPv4Address, update operation creates a new A record with new_ipv4addr release_date: "2022-07-01" 1.4.0: changes: major_changes: - - Feature for extra layer security , with `cert` and `key` parameters in playbooks for authenticating - using certificate and key ``*.pem`` file absolute path `#154 `_ + - Feature for extra layer security , with `cert` and `key` parameters in playbooks for authenticating using certificate and key ``*.pem`` file + absolute path `#154 `_ - Fix to remove issue causing due to template attr in deleting network using Ansible module nios network `#147 `_ release_summary: For ansible module, added certificate authentication feature, Few bugs fix in ansible module nios network @@ -187,9 +185,8 @@ releases: - Fix to allocate ip to a_record dynamically `#163 `_ - Fix to update 'nios_a_record' name with multiple ips having same name `#164 `_ - Fix to changelog yaml file with linting issues `#161 `_ - release_summary: Ansible Lookup modules can specify network_view to which a network/ip belongs, - Fixes camelCase issue while updating `nios_network_view` with `new_name`, Fixes issue to allocate ip to a_record dynamically, - Updates `nios_a_record` name with multiple ips having same name + release_summary: Ansible Lookup modules can specify network_view to which a network/ip belongs, Fixes camelCase issue while updating + `nios_network_view` with `new_name`, Fixes issue to allocate ip to a_record dynamically, Updates `nios_a_record` name with multiple ips having same name release_date: "2022-11-24" 1.5.0: changes: @@ -203,23 +200,23 @@ releases: - Updates default WAPI version to 2.9 `#176 `_ bugfixes: - Fixes Update A Record having multiple records with same name and different IP `#182 `_ - release_summary: Added new module NIOS Range with Create, Update and Delete features, Added new feature Member Assignment to Networks with add - remove functionality, Fixes Unable to Update/Delete EAs using Ansible plugin, Fixes Static Allocation of IPV4 address of A Record, - Updates default WAPI version to `2.9`, Added Grid Master Candidate feature + release_summary: Added new module NIOS Range with Create, Update and Delete features, Added new feature Member Assignment to Networks with add remove + functionality, Fixes Unable to Update/Delete EAs using Ansible plugin, Fixes Static Allocation of IPV4 address of A Record, Updates default WAPI + version to `2.9`, Added Grid Master Candidate feature release_date: "2023-05-11" 1.6.0: changes: major_changes: - Upgrade Ansible version support from 2.13 to 2.16. - Upgrade Python version support from 3.8 to 3.10. - release_summary: "Added new modules with CRUD features to manage NIOS DTC health check monitors: DTC HTTP Monitor, DTC ICMP Monitor, - DTC PDP Monitor, DTC SIP Monitor, DTC SNMP Monitor, DTC TCP Monitor. Added a new module with CRUD features to manage topology rulesets in NIOS. - Added a new field to define topology ruleset for the DTC Pool and DTC LBDN modules." + release_summary: "Added new modules with CRUD features to manage NIOS DTC health check monitors: DTC HTTP Monitor, DTC ICMP Monitor, DTC PDP Monitor, + DTC SIP Monitor, DTC SNMP Monitor, DTC TCP Monitor. Added a new module with CRUD features to manage topology rulesets in NIOS. Added a new field to + define topology ruleset for the DTC Pool and DTC LBDN modules." bugfixes: - Fixes typo for environment variable INFOBLOX_WAPI_VERSION `#209 `_ - Fixes environment variable max_results using INFOBLOX_MAX_RESULTS `#209 `_ - - Fixes index error for transform fields in DTC LBDN (auth_zone and Pool) and DTC POOL (servers and monitors) - `#209 `_ + - Fixes index error for transform fields in DTC LBDN (auth_zone and Pool) and DTC POOL (servers and monitors). + `#209 `_ modules: - description: Configures the Infoblox NIOS DTC HTTP monitor. name: nios_dtc_monitor_http @@ -247,6 +244,6 @@ releases: changes: minor_changes: - Ansible core version in the dependencies updated to 2.14 or later. - release_summary: "This release includes the updates of plug-in version 1.6.0 and - the following documentation changes: Ansible core version in the dependencies updated to 2.14 or later." + release_summary: "This release includes the updates of plug-in version 1.6.0 and the following documentation changes: Ansible core version in the + dependencies updated to 2.14 or later." release_date: "2023-12-19" diff --git a/changelogs/fragments/229-handle-host-rename-without-dns.yml b/changelogs/fragments/229-handle-host-rename-without-dns.yml index bf540a20..c0ea6119 100644 --- a/changelogs/fragments/229-handle-host-rename-without-dns.yml +++ b/changelogs/fragments/229-handle-host-rename-without-dns.yml @@ -1,4 +1,5 @@ --- bugfixes: - - nios_host_record - rename logic included DNS view in filter critera, even when DNS had been bypassed. Omits DNS view from filter critera when renaming a host object and DNS is bypassed. (https://github.com/infobloxopen/infoblox-ansible/issues/230) -... + - nios_host_record - rename logic included DNS view in filter critera, even when DNS had been bypassed. + - Omits DNS view from filter critera when renaming a host object and DNS is bypassed. + (https://github.com/infobloxopen/infoblox-ansible/issues/230) diff --git a/playbooks/create_extensible_attribute.yaml b/playbooks/create_extensible_attribute.yaml index 17a4c3a2..45e52285 100644 --- a/playbooks/create_extensible_attribute.yaml +++ b/playbooks/create_extensible_attribute.yaml @@ -1,6 +1,6 @@ --- - -- hosts: localhost +- name: Configure nios extensible attribute + hosts: localhost vars: nios_provider: host: 10.120.1.11 @@ -9,12 +9,12 @@ connection: local tasks: - - name: Create INT extensible attribute - infoblox.nios_modules.nios_extensible_attribute: - name: integer_ea - type: INTEGER - default_value: 11 - comment: Created with Ansible - flags: 'I' - state: present - provider: "{{ nios_provider }}" + - name: Create INT extensible attribute + infoblox.nios_modules.nios_extensible_attribute: + name: integer_ea + type: INTEGER + default_value: 11 + comment: Created with Ansible + flags: I + state: present + provider: "{{ nios_provider }}" diff --git a/playbooks/create_nsgroup_delegation.yml b/playbooks/create_nsgroup_delegation.yml index 061c3927..d1fbf4b8 100644 --- a/playbooks/create_nsgroup_delegation.yml +++ b/playbooks/create_nsgroup_delegation.yml @@ -9,7 +9,7 @@ connection: local tasks: - - name: create infoblox nameserver delegation group + - name: Create infoblox nameserver delegation group infoblox.nios_modules.nios_nsgroup_delegation: name: my-delegation-group delegate_to: @@ -17,8 +17,8 @@ address: 192.168.0.10 - name: second address: 192.168.0.20 - comment: "this is a delegation nameserver group" + comment: this is a delegation nameserver group extattrs: Site: Test Site state: present - provider: "{{ nios_provider }}" \ No newline at end of file + provider: "{{ nios_provider }}" diff --git a/playbooks/create_nsgroup_forwardingmember.yml b/playbooks/create_nsgroup_forwardingmember.yml index 96ae07c7..d364ac7f 100644 --- a/playbooks/create_nsgroup_forwardingmember.yml +++ b/playbooks/create_nsgroup_forwardingmember.yml @@ -9,10 +9,10 @@ connection: local tasks: - - name: create infoblox nameserver forwarding member group with external forwarders + - name: Create infoblox nameserver forwarding member group with external forwarders infoblox.nios_modules.nios_nsgroup_forwardingmember: name: my-forwardingmember-group - comment: "this is a forwarding member nameserver group with external forwarders" + comment: this is a forwarding member nameserver group with external forwarders extattrs: Site: Test Site forwarding_servers: @@ -31,4 +31,4 @@ - name: ns3 address: 192.168.10.3 state: present - provider: "{{ nios_provider }}" \ No newline at end of file + provider: "{{ nios_provider }}" diff --git a/playbooks/create_nsgroup_forwardstubserver.yml b/playbooks/create_nsgroup_forwardstubserver.yml index 14454ab1..d8e37a3f 100644 --- a/playbooks/create_nsgroup_forwardstubserver.yml +++ b/playbooks/create_nsgroup_forwardstubserver.yml @@ -9,10 +9,10 @@ connection: local tasks: - - name: create infoblox nameserver forward/stub group + - name: Create infoblox nameserver forward/stub group infoblox.nios_modules.nios_nsgroup_forwardstubserver: name: new-forwardstub-group - comment: "this is a forward/stub nameserver group" + comment: this is a forward/stub nameserver group extattrs: Site: Test Site external_servers: @@ -21,4 +21,4 @@ - name: second address: 192.168.0.20 state: present - provider: "{{ nios_provider }}" \ No newline at end of file + provider: "{{ nios_provider }}" diff --git a/playbooks/create_nsgroup_stubmember.yml b/playbooks/create_nsgroup_stubmember.yml index e545c3c7..478bc429 100644 --- a/playbooks/create_nsgroup_stubmember.yml +++ b/playbooks/create_nsgroup_stubmember.yml @@ -9,14 +9,14 @@ connection: local tasks: - - name: create infoblox nameserver stub member group + - name: Create infoblox nameserver stub member group infoblox.nios_modules.nios_nsgroup_stubmember: name: my-stubmember-group - comment: "this is a stub member nameserver group" + comment: this is a stub member nameserver group extattrs: Site: Test Site stub_members: - name: infoblox.cloud-ansible-client-nios-gm - name: infoblox.cloud-ansible-client-nios-mem1 state: present - provider: "{{ nios_provider }}" \ No newline at end of file + provider: "{{ nios_provider }}" diff --git a/tests/integration/targets/nios_extensible_attribute/meta/main.yaml b/tests/integration/targets/nios_extensible_attribute/meta/main.yaml index 1b01a972..a4ad32ff 100644 --- a/tests/integration/targets/nios_extensible_attribute/meta/main.yaml +++ b/tests/integration/targets/nios_extensible_attribute/meta/main.yaml @@ -1,2 +1,3 @@ +--- dependencies: - prepare_nios_tests diff --git a/tests/integration/targets/nios_extensible_attribute/tasks/main.yaml b/tests/integration/targets/nios_extensible_attribute/tasks/main.yaml index e1442d4f..b8d6d9c3 100644 --- a/tests/integration/targets/nios_extensible_attribute/tasks/main.yaml +++ b/tests/integration/targets/nios_extensible_attribute/tasks/main.yaml @@ -1 +1,3 @@ -- include_tasks: nios_extensible_attribute.yaml +--- +- name: Include tasks for extensible attributes + ansible.builtin.include_tasks: nios_extensible_attribute.yaml diff --git a/tests/integration/targets/nios_extensible_attribute/tasks/nios_extensible_attribute.yaml b/tests/integration/targets/nios_extensible_attribute/tasks/nios_extensible_attribute.yaml index b5b54470..e56e3b61 100644 --- a/tests/integration/targets/nios_extensible_attribute/tasks/nios_extensible_attribute.yaml +++ b/tests/integration/targets/nios_extensible_attribute/tasks/nios_extensible_attribute.yaml @@ -1,3 +1,4 @@ +--- - name: Clean up existing EA infoblox.nios_modules.nios_extensible_attribute: name: stringEA @@ -9,7 +10,7 @@ infoblox.nios_modules.nios_extensible_attribute: name: stringEA type: STRING - default_value: "string" + default_value: string min: 1 max: 15 comment: Created string EA with Ansible @@ -21,7 +22,7 @@ infoblox.nios_modules.nios_extensible_attribute: name: stringEA type: STRING - default_value: "string" + default_value: string min: 1 max: 15 comment: Updated string EA with Ansible @@ -36,7 +37,7 @@ default_value: "15" min: 1 max: 15 - flags: 'I' + flags: I comment: Created string EA with Ansible state: present provider: "{{ nios_provider }}" @@ -49,7 +50,7 @@ default_value: "14" min: 1 max: 15 - flags: 'I' + flags: I comment: Created string EA with Ansible state: present provider: "{{ nios_provider }}" @@ -59,7 +60,7 @@ infoblox.nios_modules.nios_extensible_attribute: name: stringEA type: STRING - default_value: "string" + default_value: string min: 1 max: 15 state: present @@ -73,7 +74,7 @@ default_value: "14" min: 1 max: 15 - flags: 'I' + flags: I comment: Created string EA with Ansible state: absent provider: "{{ nios_provider }}" @@ -86,7 +87,7 @@ list_values: - option1 - option2 - default_value: "option1" + default_value: option1 comment: Created enum EA with Ansible state: present provider: "{{ nios_provider }}" @@ -99,7 +100,7 @@ list_values: - option1 - option2 - default_value: "option2" + default_value: option2 comment: Updated enum EA default value with Ansible state: present provider: "{{ nios_provider }}" @@ -135,13 +136,13 @@ - name: Verify outcomes including new tests ansible.builtin.assert: that: - - "create_string_ea.changed" - - "update_string_ea.changed" - - "create_integer_ea.changed" - - "update_integer_ea.changed" - - "remove_string_ea.changed" - - "remove_integer_ea.changed" - - "create_enum_ea.changed" - - "update_enum_ea.changed" - - "create_date_ea.changed" - - "update_date_ea.changed" + - create_string_ea.changed + - update_string_ea.changed + - create_integer_ea.changed + - update_integer_ea.changed + - remove_string_ea.changed + - remove_integer_ea.changed + - create_enum_ea.changed + - update_enum_ea.changed + - create_date_ea.changed + - update_date_ea.changed diff --git a/tests/integration/targets/nios_host_record/tasks/nios_host_record_idempotence.yml b/tests/integration/targets/nios_host_record/tasks/nios_host_record_idempotence.yml index c1ea7cf0..4ed09d7d 100644 --- a/tests/integration/targets/nios_host_record/tasks/nios_host_record_idempotence.yml +++ b/tests/integration/targets/nios_host_record/tasks/nios_host_record_idempotence.yml @@ -97,7 +97,7 @@ ipv4: - address: 192.168.10.1 dhcp: true - mac: 00-80-C8-E3-4C-BD + mac: "00-80-C8-E3-4C-BD" state: present provider: "{{ nios_provider }}" register: ipv4_create5 @@ -108,7 +108,7 @@ ipv4: - address: 192.168.10.1 dhcp: true - mac: 00-80-C8-E3-4C-BD + mac: "00-80-C8-E3-4C-BD" state: present provider: "{{ nios_provider }}" register: ipv4_create6 diff --git a/tests/integration/targets/nios_nsgroup_delegation/defaults/main.yaml b/tests/integration/targets/nios_nsgroup_delegation/defaults/main.yaml index ebf6ffc9..9ef5ba51 100644 --- a/tests/integration/targets/nios_nsgroup_delegation/defaults/main.yaml +++ b/tests/integration/targets/nios_nsgroup_delegation/defaults/main.yaml @@ -1,3 +1,3 @@ --- testcase: "*" -test_items: [] \ No newline at end of file +test_items: [] diff --git a/tests/integration/targets/nios_nsgroup_delegation/meta/main.yaml b/tests/integration/targets/nios_nsgroup_delegation/meta/main.yaml index 9472935b..a4ad32ff 100644 --- a/tests/integration/targets/nios_nsgroup_delegation/meta/main.yaml +++ b/tests/integration/targets/nios_nsgroup_delegation/meta/main.yaml @@ -1,2 +1,3 @@ +--- dependencies: - - prepare_nios_tests \ No newline at end of file + - prepare_nios_tests diff --git a/tests/integration/targets/nios_nsgroup_delegation/tasks/main.yml b/tests/integration/targets/nios_nsgroup_delegation/tasks/main.yml index 0dd08be4..82f2cc34 100644 --- a/tests/integration/targets/nios_nsgroup_delegation/tasks/main.yml +++ b/tests/integration/targets/nios_nsgroup_delegation/tasks/main.yml @@ -1 +1,3 @@ -- include_tasks: nios_nsgroup_delegation_idempotence.yml +--- +- name: Include idempotence tasks for nsgroup delegation + ansible.builtin.include_tasks: nios_nsgroup_delegation_idempotence.yml diff --git a/tests/integration/targets/nios_nsgroup_delegation/tasks/nios_nsgroup_delegation_idempotence.yml b/tests/integration/targets/nios_nsgroup_delegation/tasks/nios_nsgroup_delegation_idempotence.yml index aad5ae76..8162f054 100644 --- a/tests/integration/targets/nios_nsgroup_delegation/tasks/nios_nsgroup_delegation_idempotence.yml +++ b/tests/integration/targets/nios_nsgroup_delegation/tasks/nios_nsgroup_delegation_idempotence.yml @@ -1,4 +1,5 @@ -- name: cleanup nsgroup delegation +--- +- name: Cleanup nsgroup delegation nios_nsgroup_delegation: name: ansible-nsgroup_delegation state: absent @@ -7,7 +8,7 @@ - name: ns1 address: 192.168.0.1 -- name: configure a nsgroup delegation on the system +- name: Configure a nsgroup delegation on the system nios_nsgroup_delegation: name: ansible-nsgroup_delegation state: present @@ -17,7 +18,7 @@ address: 192.168.0.1 register: nsgroup_delegation_create1 -- name: configure another nsgroup delegation on the system +- name: Configure another nsgroup delegation on the system nios_nsgroup_delegation: name: ansible-nsgroup_delegation state: present @@ -27,7 +28,7 @@ address: 192.168.0.1 register: nsgroup_delegation_create2 -- name: update the comment and ext attributes for an existing nsgroup delegation +- name: Update the comment and ext attributes for an existing nsgroup delegation nios_nsgroup_delegation: name: ansible-nsgroup_delegation comment: this is an example comment @@ -40,7 +41,7 @@ address: 192.168.0.1 register: nsgroup_delegation_update1 -- name: update again the comment and ext attributes for an existing nsgroup delegation +- name: Update again the comment and ext attributes for an existing nsgroup delegation nios_nsgroup_delegation: name: ansible-nsgroup_delegation comment: this is an example comment @@ -53,7 +54,7 @@ address: 192.168.0.1 register: nsgroup_delegation_update2 -- name: remove the nsgroup delegation +- name: Remove the nsgroup delegation nios_nsgroup_delegation: name: ansible-nsgroup_delegation state: absent @@ -63,7 +64,7 @@ address: 192.168.0.1 register: nsgroup_delegation_delete1 -- name: remove again the nsgroup delegation +- name: Remove again the nsgroup delegation nios_nsgroup_delegation: name: ansible-nsgroup_delegation state: absent @@ -73,11 +74,12 @@ address: 192.168.0.1 register: nsgroup_delegation_delete2 -- assert: +- name: Assert changes in nsgroup delegation + ansible.builtin.assert: that: - - "nsgroup_delegation_create1.changed" - - "not nsgroup_delegation_create2.changed" - - "nsgroup_delegation_update1.changed" - - "not nsgroup_delegation_update2.changed" - - "nsgroup_delegation_delete1.changed" - - "not nsgroup_delegation_delete2.changed" + - nsgroup_delegation_create1.changed + - not nsgroup_delegation_create2.changed + - nsgroup_delegation_update1.changed + - not nsgroup_delegation_update2.changed + - nsgroup_delegation_delete1.changed + - not nsgroup_delegation_delete2.changed diff --git a/tests/integration/targets/nios_nsgroup_forwardingmember/defaults/main.yaml b/tests/integration/targets/nios_nsgroup_forwardingmember/defaults/main.yaml index ebf6ffc9..9ef5ba51 100644 --- a/tests/integration/targets/nios_nsgroup_forwardingmember/defaults/main.yaml +++ b/tests/integration/targets/nios_nsgroup_forwardingmember/defaults/main.yaml @@ -1,3 +1,3 @@ --- testcase: "*" -test_items: [] \ No newline at end of file +test_items: [] diff --git a/tests/integration/targets/nios_nsgroup_forwardingmember/meta/main.yaml b/tests/integration/targets/nios_nsgroup_forwardingmember/meta/main.yaml index 9472935b..a4ad32ff 100644 --- a/tests/integration/targets/nios_nsgroup_forwardingmember/meta/main.yaml +++ b/tests/integration/targets/nios_nsgroup_forwardingmember/meta/main.yaml @@ -1,2 +1,3 @@ +--- dependencies: - - prepare_nios_tests \ No newline at end of file + - prepare_nios_tests diff --git a/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/main.yml b/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/main.yml index 32ed6486..12c42e5b 100644 --- a/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/main.yml +++ b/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/main.yml @@ -1 +1,3 @@ -- include_tasks: nios_nsgroup_forwardingmember_idempotence.yml +--- +- name: Including idempotence tasks for nsgroup forwardingmember + ansible.builtin.include_tasks: nios_nsgroup_forwardingmember_idempotence.yml diff --git a/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/nios_nsgroup_forwardingmember_idempotence.yml b/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/nios_nsgroup_forwardingmember_idempotence.yml index 743b1cd9..44722f1f 100644 --- a/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/nios_nsgroup_forwardingmember_idempotence.yml +++ b/tests/integration/targets/nios_nsgroup_forwardingmember/tasks/nios_nsgroup_forwardingmember_idempotence.yml @@ -1,4 +1,5 @@ -- name: cleanup nsgroup forwardingmember +--- +- name: Cleanup nsgroup forwardingmember nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember state: absent @@ -10,7 +11,7 @@ - name: ns1 address: 192.168.10.1 -- name: configure a nsgroup forwardingmember on the system +- name: Configure a nsgroup forwardingmember on the system nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember state: present @@ -23,7 +24,7 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_create1 -- name: configure another nsgroup forwardingmember on the system +- name: Configure another nsgroup forwardingmember on the system nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember state: present @@ -36,7 +37,7 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_create2 -- name: update the comment and ext attributes for an existing nsgroup forwardingmember +- name: Update the comment and ext attributes for an existing nsgroup forwardingmember nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember comment: this is an example comment @@ -52,7 +53,7 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_update1 -- name: update again the comment and ext attributes for an existing nsgroup forwardingmember +- name: Update again the comment and ext attributes for an existing nsgroup forwardingmember nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember comment: this is an example comment @@ -68,7 +69,7 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_update2 -- name: remove the nsgroup forwardingmember +- name: Remove the nsgroup forwardingmember nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember state: absent @@ -81,7 +82,7 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_delete1 -- name: remove again the nsgroup forwardingmember +- name: Remove again the nsgroup forwardingmember nios_nsgroup_forwardingmember: name: ansible-nsgroup_forwardingmember state: absent @@ -94,11 +95,12 @@ address: 192.168.10.1 register: nsgroup_forwardingmember_delete2 -- assert: +- name: Assert changes in nsgroup forwardingmember + ansible.builtin.assert: that: - - "nsgroup_forwardingmember_create1.changed" - - "not nsgroup_forwardingmember_create2.changed" - - "nsgroup_forwardingmember_update1.changed" - - "not nsgroup_forwardingmember_update2.changed" - - "nsgroup_forwardingmember_delete1.changed" - - "not nsgroup_forwardingmember_delete2.changed" + - nsgroup_forwardingmember_create1.changed + - not nsgroup_forwardingmember_create2.changed + - nsgroup_forwardingmember_update1.changed + - not nsgroup_forwardingmember_update2.changed + - nsgroup_forwardingmember_delete1.changed + - not nsgroup_forwardingmember_delete2.changed diff --git a/tests/integration/targets/nios_nsgroup_forwardstubserver/defaults/main.yaml b/tests/integration/targets/nios_nsgroup_forwardstubserver/defaults/main.yaml index ebf6ffc9..9ef5ba51 100644 --- a/tests/integration/targets/nios_nsgroup_forwardstubserver/defaults/main.yaml +++ b/tests/integration/targets/nios_nsgroup_forwardstubserver/defaults/main.yaml @@ -1,3 +1,3 @@ --- testcase: "*" -test_items: [] \ No newline at end of file +test_items: [] diff --git a/tests/integration/targets/nios_nsgroup_forwardstubserver/meta/main.yaml b/tests/integration/targets/nios_nsgroup_forwardstubserver/meta/main.yaml index 9472935b..a4ad32ff 100644 --- a/tests/integration/targets/nios_nsgroup_forwardstubserver/meta/main.yaml +++ b/tests/integration/targets/nios_nsgroup_forwardstubserver/meta/main.yaml @@ -1,2 +1,3 @@ +--- dependencies: - - prepare_nios_tests \ No newline at end of file + - prepare_nios_tests diff --git a/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/main.yml b/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/main.yml index e356aa50..0ef3e29e 100644 --- a/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/main.yml +++ b/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/main.yml @@ -1 +1,3 @@ -- include_tasks: nios_nsgroup_forwardstubserver_idempotence.yml +--- +- name: Include idempotence tasks for nsgroup forwardstubserver + ansible.builtin.include_tasks: nios_nsgroup_forwardstubserver_idempotence.yml diff --git a/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/nios_nsgroup_forwardstubserver_idempotence.yml b/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/nios_nsgroup_forwardstubserver_idempotence.yml index 915c1186..01f711c3 100644 --- a/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/nios_nsgroup_forwardstubserver_idempotence.yml +++ b/tests/integration/targets/nios_nsgroup_forwardstubserver/tasks/nios_nsgroup_forwardstubserver_idempotence.yml @@ -1,4 +1,5 @@ -- name: cleanup nsgroup forwardstubserver +--- +- name: Cleanup nsgroup forwardstubserver nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver state: absent @@ -7,7 +8,7 @@ - name: ns1 address: 192.168.0.1 -- name: configure a nsgroup forwardstubserver on the system +- name: Configure a nsgroup forwardstubserver on the system nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver state: present @@ -17,7 +18,7 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_create1 -- name: configure another nsgroup forwardstubserver on the system +- name: Configure another nsgroup forwardstubserver on the system nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver state: present @@ -27,7 +28,7 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_create2 -- name: update the comment and ext attributes for an existing nsgroup forwardstubserver +- name: Update the comment and ext attributes for an existing nsgroup forwardstubserver nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver comment: this is an example comment @@ -40,7 +41,7 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_update1 -- name: update again the comment and ext attributes for an existing nsgroup forwardstubserver +- name: Update again the comment and ext attributes for an existing nsgroup forwardstubserver nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver comment: this is an example comment @@ -53,7 +54,7 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_update2 -- name: remove the nsgroup forwardstubserver +- name: Remove the nsgroup forwardstubserver nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver state: absent @@ -63,7 +64,7 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_delete1 -- name: remove again the nsgroup forwardstubserver +- name: Remove again the nsgroup forwardstubserver nios_nsgroup_forwardstubserver: name: ansible-nsgroup_forwardstubserver state: absent @@ -73,11 +74,12 @@ address: 192.168.0.1 register: nsgroup_forwardstubserver_delete2 -- assert: +- name: Assert changes in nsgroup forwardstubserver + ansible.builtin.assert: that: - - "nsgroup_forwardstubserver_create1.changed" - - "not nsgroup_forwardstubserver_create2.changed" - - "nsgroup_forwardstubserver_update1.changed" - - "not nsgroup_forwardstubserver_update2.changed" - - "nsgroup_forwardstubserver_delete1.changed" - - "not nsgroup_forwardstubserver_delete2.changed" + - nsgroup_forwardstubserver_create1.changed + - not nsgroup_forwardstubserver_create2.changed + - nsgroup_forwardstubserver_update1.changed + - not nsgroup_forwardstubserver_update2.changed + - nsgroup_forwardstubserver_delete1.changed + - not nsgroup_forwardstubserver_delete2.changed diff --git a/tests/integration/targets/nios_nsgroup_stubmember/defaults/main.yaml b/tests/integration/targets/nios_nsgroup_stubmember/defaults/main.yaml index ebf6ffc9..9ef5ba51 100644 --- a/tests/integration/targets/nios_nsgroup_stubmember/defaults/main.yaml +++ b/tests/integration/targets/nios_nsgroup_stubmember/defaults/main.yaml @@ -1,3 +1,3 @@ --- testcase: "*" -test_items: [] \ No newline at end of file +test_items: [] diff --git a/tests/integration/targets/nios_nsgroup_stubmember/meta/main.yaml b/tests/integration/targets/nios_nsgroup_stubmember/meta/main.yaml index 9472935b..a4ad32ff 100644 --- a/tests/integration/targets/nios_nsgroup_stubmember/meta/main.yaml +++ b/tests/integration/targets/nios_nsgroup_stubmember/meta/main.yaml @@ -1,2 +1,3 @@ +--- dependencies: - - prepare_nios_tests \ No newline at end of file + - prepare_nios_tests diff --git a/tests/integration/targets/nios_nsgroup_stubmember/tasks/main.yml b/tests/integration/targets/nios_nsgroup_stubmember/tasks/main.yml index e0cbb36f..db797afb 100644 --- a/tests/integration/targets/nios_nsgroup_stubmember/tasks/main.yml +++ b/tests/integration/targets/nios_nsgroup_stubmember/tasks/main.yml @@ -1 +1,3 @@ -- include_tasks: nios_nsgroup_stubmember_idempotence.yml +--- +- name: Include idempotence tasks for nsgroup_stubmember + ansible.builtin.include_tasks: nios_nsgroup_stubmember_idempotence.yml diff --git a/tests/integration/targets/nios_nsgroup_stubmember/tasks/nios_nsgroup_stubmember_idempotence.yml b/tests/integration/targets/nios_nsgroup_stubmember/tasks/nios_nsgroup_stubmember_idempotence.yml index b7f97108..ae11798c 100644 --- a/tests/integration/targets/nios_nsgroup_stubmember/tasks/nios_nsgroup_stubmember_idempotence.yml +++ b/tests/integration/targets/nios_nsgroup_stubmember/tasks/nios_nsgroup_stubmember_idempotence.yml @@ -1,4 +1,5 @@ -- name: cleanup nsgroup stubmember +--- +- name: Cleanup nsgroup stubmember nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember state: absent @@ -6,7 +7,7 @@ stub_members: - name: ns1 -- name: configure a nsgroup stubmember on the system +- name: Configure a nsgroup stubmember on the system nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember state: present @@ -15,7 +16,7 @@ - name: ns1 register: nsgroup_stubmember_create1 -- name: configure another nsgroup stubmember on the system +- name: Configure another nsgroup stubmember on the system nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember state: present @@ -24,7 +25,7 @@ - name: ns1 register: nsgroup_stubmember_create2 -- name: update the comment and ext attributes for an existing nsgroup stubmember +- name: Update the comment and ext attributes for an existing nsgroup stubmember nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember comment: this is an example comment @@ -36,7 +37,7 @@ - name: ns1 register: nsgroup_stubmember_update1 -- name: update again the comment and ext attributes for an existing nsgroup stubmember +- name: Update again the comment and ext attributes for an existing nsgroup stubmember nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember comment: this is an example comment @@ -48,7 +49,7 @@ - name: ns1 register: nsgroup_stubmember_update2 -- name: remove the nsgroup stubmember +- name: Remove the nsgroup stubmember nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember state: absent @@ -57,7 +58,7 @@ - name: ns1 register: nsgroup_stubmember_delete1 -- name: remove again the nsgroup stubmember +- name: Remove again the nsgroup stubmember nios_nsgroup_stubmember: name: ansible-nsgroup_stubmember state: absent @@ -66,11 +67,12 @@ - name: ns1 register: nsgroup_stubmember_delete2 -- assert: +- name: Assert changes in nsgroup_stubmember tasks + ansible.builtin.assert: that: - - "nsgroup_stubmember_create1.changed" - - "not nsgroup_stubmember_create2.changed" - - "nsgroup_stubmember_update1.changed" - - "not nsgroup_stubmember_update2.changed" - - "nsgroup_stubmember_delete1.changed" - - "not nsgroup_stubmember_delete2.changed" + - nsgroup_stubmember_create1.changed + - not nsgroup_stubmember_create2.changed + - nsgroup_stubmember_update1.changed + - not nsgroup_stubmember_update2.changed + - nsgroup_stubmember_delete1.changed + - not nsgroup_stubmember_delete2.changed