Skip to content

Commit

Permalink
linting fixes modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fmunozmiranda committed Jan 8, 2025
1 parent 35d61b0 commit eab975b
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 74 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ meraki_server
Create a playbook `who_am_i.yml` ([example](https://github.com/meraki/dashboard-api-ansible/blob/main/playbooks/who_am_i.yml)):
```
---
- hosts: meraki_servers
- name: Play Name
hosts: meraki_servers
gather_facts: false
tasks:
- name: Get my administered identities
Expand Down
2 changes: 1 addition & 1 deletion playbooks/Get_AP_Serials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
total_pages: -1
register: result
- name: Filter APs with "wireless" productTypes and get Serial Number
set_fact:
ansible.builtin.set_fact:
filtered_aps: '{{ result.meraki_response | selectattr(''productType'', ''contains'',
''wireless'') | map(attribute=''serial'') | list }}'
register: aps
Expand Down
3 changes: 2 additions & 1 deletion playbooks/What_Org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- hosts: meraki_servers
- name: Play Name
hosts: meraki_servers
gather_facts: false
tasks:
- name: Get all Organizations
Expand Down
3 changes: 2 additions & 1 deletion playbooks/Who_Am_I.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- hosts: meraki_servers
- name: Play Name
hosts: meraki_servers
gather_facts: false
tasks:
- name: Get my administered identities
Expand Down
1 change: 0 additions & 1 deletion playbooks/credentials.yml

This file was deleted.

6 changes: 0 additions & 6 deletions playbooks/devices.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion playbooks/devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
hosts: localhost
gather_facts: false
tasks:
- name: change name of device
- name: Change name of device
cisco.meraki.devices:
name: new name 12
serial: QBSC-ALSL-3GXN
Expand Down
37 changes: 0 additions & 37 deletions playbooks/old_collection_test.yml

This file was deleted.

1 change: 0 additions & 1 deletion playbooks/organizations_login_security.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- name: Play Name
hosts: localhost
vars:
vars: null
org_id: 828099381482762270
gather_facts: false
tasks:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/switch_port_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
hosts: localhost
gather_facts: false
tasks:
- name: update ports
- name: Update ports
cisco.meraki.devices_switch_ports:
meraki_suppress_logging: true
state: present
Expand Down
3 changes: 2 additions & 1 deletion playbooks/who_am_i.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- hosts: meraki_servers
- name: Play Name
hosts: meraki_servers
gather_facts: false
tasks:
- name: Get my administered identities
Expand Down
2 changes: 1 addition & 1 deletion playbooks/wifi_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
organizationId: '{{ org_id }}'
register: result
- name: Filter networks with "wireless" productTypes
set_fact:
ansible.builtin.set_fact:
filtered_networks: '{{ result.meraki_response | selectattr(''productTypes'',
''contains'', ''wireless'') | list }}'
- name: Create corporate SSID
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/devices_live_tools_cable_test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

Check failure on line 28 in plugins/modules/devices_live_tools_cable_test_info.py

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[empty-lines]

Too many blank lines (2 > 0)
"""
RETURN = r
"""
RETURN = r"""
meraki_response:
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
returned: always
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/devices_live_tools_throughput_test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

Check failure on line 28 in plugins/modules/devices_live_tools_throughput_test_info.py

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[empty-lines]

Too many blank lines (2 > 0)
"""
RETURN = r
"""
RETURN = r"""
meraki_response:
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
returned: always
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/devices_live_tools_wake_on_lan_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

Check failure on line 28 in plugins/modules/devices_live_tools_wake_on_lan_info.py

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[empty-lines]

Too many blank lines (2 > 0)
"""
RETURN = r
"""
RETURN = r"""
meraki_response:
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
returned: always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
delegate_to: localhost
register: query_all

- set_fact:
- ansible.builtin.set_fact:
interface_id_1: '{{ query_all.data.1.interface_id }}'
ignore_errors: true

Expand Down Expand Up @@ -96,7 +96,7 @@
delegate_to: localhost
register: create

- set_fact:
- ansible.builtin.set_fact:
interface_id_1: '{{ create.data.interface_id }}'

- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
delegate_to: localhost
register: create_net_switch

- set_fact:
- ansible.builtin.set_fact:
net_id: '{{ create_net_switch.data.id }}'

- name: Create new stack
Expand All @@ -31,7 +31,7 @@
- "QBSB-D75G-PXCG"
register: stack

- set_fact:
- ansible.builtin.set_fact:
stack_id: '{{ stack.data.id }}'

- name: Create l3 interface with check mode
Expand Down Expand Up @@ -87,7 +87,7 @@
delegate_to: localhost
register: query_l3

- set_fact:
- ansible.builtin.set_fact:
interface_id_1: '{{ create.data.interface_id }}'

- name: Query one l3 interface
Expand Down Expand Up @@ -200,7 +200,7 @@
- debug:
var: query_l3

- set_fact:
- ansible.builtin.set_fact:
interface_id_1: '{{ query_l3.data[0].interface_id }}'
ignore_errors: true

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/meraki_mx_malware/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
delegate_to: localhost
register: net

- set_fact:
- ansible.builtin.set_fact:
net_id: '{{ net.data.id }}'

- name: Enable malware protection with check mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
delegate_to: localhost
register: net_spoke

- set_fact:
- ansible.builtin.set_fact:
net_spoke_id: '{{ net_spoke.data.id }}'
net_hub_id: '{{ net_hub.data.id }}'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
vlans_enabled: true
delegate_to: localhost

- set_fact:
- ansible.builtin.set_fact:
net_id: '{{ net.data.id }}'

- name: Initialize static route id list
set_fact:
ansible.builtin.set_fact:
route_ids: []

- name: Create VLAN
Expand All @@ -55,7 +55,7 @@
delegate_to: localhost
register: create_route

- set_fact:
- ansible.builtin.set_fact:
route_ids: "{{ route_ids + [create_route.data.id] }}"

- name: Create static_route with idempotency
Expand Down Expand Up @@ -86,7 +86,7 @@
delegate_to: localhost
register: second_create

- set_fact:
- ansible.builtin.set_fact:
route_ids: "{{ route_ids + [second_create.data.id] }}"

- assert:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/meraki_mx_vlan/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
delegate_to: localhost
register: new_net

- set_fact:
- ansible.builtin.set_fact:
test_net_id: '{{ new_net.data.id }}'

- name: Enable VLANs on network
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/targets/meraki_network/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
delegate_to: localhost
register: create_net_switch

- set_fact:
- ansible.builtin.set_fact:
switch_net_id: '{{ create_net_switch.data.id }}'

- name: Copy network
Expand Down Expand Up @@ -361,7 +361,7 @@
delegate_to: localhost
register: create_net_tags

- set_fact:
- ansible.builtin.set_fact:
tag_net_id: '{{ create_net_tags.data.id }}'

- name: Modify network by net_id
Expand Down

0 comments on commit eab975b

Please sign in to comment.