Giter Site home page Giter Site logo

meraki-ansible-test's Introduction

Ansible Collection - cisco.meraki

Ansible Modules for Meraki

The meraki-ansible project provides an Ansible collection for managing and automating your Cisco Meraki environment. It consists of a set of modules and roles for performing tasks related to Meraki.

This collection has been tested and supports Cisco Meraki v1.33.0

Note: This collection is not compatible with versions of Ansible before v2.8.

Other versions of this collection have support for previous Cisco Meraki versions. The recommended versions are listed below on the Compatibility matrix.

Compatibility matrix

Cisco Meraki version Ansible "cisco.meraki" version Python "DashboardAPI" version
1.33.0 1.0.0 1.33.0

Notes:

  1. The "Python 'merakisdk' version" column has the minimum recommended version used when testing the Ansible collection. This means you could use later versions of the Python "merakisdk" than those listed.
  2. The "Cisco Meraki version" column has the value of the meraki_version you should use for the Ansible collection.

Installing according to Compatibility Matrix

For example, for Cisco Meraki 1.33.0, it is recommended to use Ansible "cisco.meraki" v1.0.0 and Python "meraki DashboardAPI" v1.33.0.

To get the Python Meraki SDK v1.33.0 in a fresh development environment:

sudo pip install meraki==1.33.0

To get the Ansible collection v1.0.0 in a fresh development environment:

ansible-galaxy collection install cisco.meraki:1.0.0

Requirements

  • Ansible >= 2.9
  • Python Meraki SDK v1.33.0 or newer
  • Python >= 3.6, as the Meraki SDK doesn't support Python version 2.x

Install

Ansible must be installed (Install guide)

sudo pip install ansible

Python Meraki SDK must be installed

sudo pip install meraki

Install the collection (Galaxy link)

ansible-galaxy collection install cisco.meraki

Use

First, your Meraki API key needs to be available for the playbook to use. You can leverage environment variables export MERAKI_DASHBOARD_API_KEY=093b24e85df15a3e66f1fc359f4c48493eaa1b73, or create a credentials.yml (example) file. Note: storing your API key in an unencrypted text file is not recommended for security reasons.

---
meraki_api_key: "ABC"
meraki_base_url: "https://api.meraki.com/api/v1"
meraki_single_request_timeout: ""
meraki_certificate_path: ""
meraki_requests_proxy: True
meraki_wait_on_rate_limit: 60
meraki_nginx_429_retry_wait_time: 60
meraki_action_batch_retry_wait_time: 60
meraki_retry_4xx_error: False
meraki_retry_4xx_error_wait_time: 60
meraki_maximum_retries: 2
meraki_output_log: True
meraki_log_file_prefix: "meraki_api_"
meraki_log_path: ""
meraki_print_console: True
meraki_suppress_logging: False
meraki_simulate: False
meraki_be_geo_id: ""
meraki_caller: ""
meraki_use_iterator_for_get_pages: False
meraki_inherit_logging_config: False

Create a hosts (example) file that uses [meraki_servers] with your Cisco Meraki Settings:

[meraki_servers]
meraki_server

Then, create a playbook myplaybook.yml (example) referencing the variables in your credentials.yml file and specifying the full namespace path to the module, plugin and/or role:

---
- hosts: meraki_servers
  gather_facts: false
  tasks:
    - name: Get all administered _identities _me
      cisco.meraki.administered_identities_me_info:
        meraki_suppress_logging: true
      register: result

Execute the playbook:

ansible-playbook -i hosts myplaybook.yml

In the playbooks directory you can find more examples and use cases.

Update

Getting the latest/nightly collection build

Clone the meraki-ansible repository.

git clone https://github.com/cisco-en-programmability/meraki-ansible.git

Go to the meraki-ansible directory

cd meraki-ansible

Pull the latest master from the repo

git pull origin master

Build and install a collection from source

ansible-galaxy collection build --force
ansible-galaxy collection install cisco-meraki-* --force

See Also:

Attention macOS users

If you're using macOS you may receive this error when running your playbook:

objc[34120]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[34120]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
ERROR! A worker was found in a dead state

If that's the case try setting this environment variable:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Contributing to this collection

Ongoing development efforts and contributions to this collection are tracked as issues in this repository.

We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the Cisco Meraki Ansible collection repository.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Releasing, Versioning and Deprecation

This collection follows Semantic Versioning. More details on versioning can be found in the Ansible docs.

New minor and major releases as well as deprecations will follow new releases and deprecations of the Cisco Meraki product, its REST API and the corresponding Python SDK, which this project relies on.

meraki-ansible-test's People

Contributors

fmunozmiranda avatar obrigg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

obrigg

meraki-ansible-test's Issues

devices_camera_quality_and_retention - problematic attribute

Running the following task:

  - name: Update quality and retention settings
    cisco.meraki.devices_camera_quality_and_retention:
      serial: "{{ serial_number }}"
      audioRecordingEnabled: true
      motionBasedRetentionEnabled: true
      motionDetectorVersion: 2
      quality: High
      resolution: 1920x1080
      restrictedBandwidthModeEnabled: false

I am getting an error about audioRecordingEnabled and restrictedBandwidthModeEnabled must be booleans, even though they are.

several MX settings modules failing with "Object does not exists"

Behavior

Both the "networks_appliance_settings" and the "networks_appliance_vlans_settings" modules are failing with the same error:

The full traceback is:
NoneType: None
fatal: [craig-home-mx1]: FAILED! => {
    "changed": false,
    "msg": "Object does not exists, plugin only has update"
}
Example Playbook
- name: Configure MX Settings
  hosts: craig-home-mx1
  connection: local
  collections:
    - cisco.meraki
  tasks:

  - name: Configure settings
    networks_appliance_settings:
      meraki_api_key: "{{ meraki_api_key }}"
      meraki_suppress_logging: "{{meraki_suppress_logging}}"
      networkId: "{{ networkId }}"
      clientTrackingMethod: "{{ settings.clientTrackingMethod }}"
      deploymentMode: "{{ settings.deploymentMode }}"
      state: present
Expected Behavior

Ansible playbook should execute 'GET' first and compare for idempotency, then after diff update if needed. Instead there seem to be analogous "_info" versions of these API endpoints as separate modules.

Environment

MacOS Ventura 13.4
ansible-core==2.15.1
meraki==1.34.0
Python 3.11.4

ansible.utils 2.10.3
cisco.meraki 1.0.0

Notes

This is similar to issue #8

Am I missing "get organization networks"?

Hi,
I thought leveraging GitHub issues will be an effective way to discuss and track feedback about the collection.
Trying to create a playbook that will iterate through several networks, I wanted to list the network of an organization (https://developer.cisco.com/meraki/api-v1/#!list-the-networks-that-the-user-has-privileges-on-in-an-organization). Looking into networks.py I can see how to create, delete, and update a network. However, I don't see how can I list the networks of the org.

Am I reading it wrong?

Updating switch_port is failing

Trying to run this playbook:

---
- hosts: meraki_servers
  gather_facts: false
  tasks:
    - name: update ports
      cisco.meraki.devices_switch_ports:
        meraki_suppress_logging: true
        state: present
        serial: "QBSB-D5ZD-9CXT"
        vlan: 10
        portId: 1 

It's failing with the following error: Object does not exists, plugin only has update

idempotency broken on networks_appliance_firewall_l3_firewall_rules

Behavior

When running a play to configure L3 firewall rules the play notes a change being made everytime, even re-running the same play.

Example playbook

- name: Configure MX VLANs
  hosts: craig-home-mx1
  connection: local
  collections:
    - cisco.meraki
  tasks:

  - name: Configure L3 rules
    networks_appliance_firewall_l3_firewall_rules:
      meraki_api_key: "{{ meraki_api_key }}"
      meraki_suppress_logging: "{{meraki_suppress_logging}}"
      networkId: "{{ networkId }}"
      rules: "{{ l3_rules }}"
      state: present
    register: result
    when: "'appliances' in group_names"

Suspected Issue

when doing a GET of meraki L3 FW rules it always includes the default firewall rule, but if you attempt to do a POST that includes the default rule it attempts to add it as an additional custom rule. If we can ignore

Expected behavior

idempotency works and ansible does now show a change being made

environment

MacOS Ventura 13.4
ansible-core==2.15.1
meraki==1.34.0
Python 3.11.4

ansible.utils 2.10.3
cisco.meraki 1.0.0

Trying to update a SSID

Hi,
I'm trying to update a SSID using the following playbook:

---

- hosts: meraki_servers
  vars_files:
    - credentials.yml
  vars:
    org_id: "828099381482762270"
    corp_name: "ACME"
    network_id: "L_828099381482770865"
  gather_facts: false
  tasks:

    - name: Create corporate SSID
      cisco.meraki.networks_wireless_ssids:
        meraki_api_key: "{{meraki_api_key}}"
        meraki_suppress_logging: true
        state: present
        enabled: true
        name: "{{corp_name}}"
        networkId: "{{ network_id }}"
        number: "1"

And I am getting the following error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None fatal: [meraki_server]: FAILED! => {"changed": false, "msg": "Object does not exists, plugin only has update"}

Looks like in networks_wireless_ssids.py line 567 (if obj_exists:) the object doesn't seem to exist.

cisco.meraki.networks_appliance_ssids is failing with "Object does not exists, plugin only has update

Play:

    - name: Update appliance SSID
      cisco.meraki.networks_appliance_ssids:
        state: present
        authMode: 8021x-radius
        defaultVlanId: 1
        dhcpEnforcedDeauthentication:
          enabled: true
        enabled: true
        encryptionMode: wpa
        name: My SSID
        networkId: "{{network_id}}"
        number: 1
        psk: psk
        radiusServers:
        - host: 1.2.3.4
          port: 1000
          secret: secret
        visible: true
        wpaEncryptionMode: WPA2 only

Error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None fatal: [meraki_server]: FAILED! => {"changed": false, "msg": "Object does not exists, plugin only has update"}

I tried using the "number" as a string and as an int. same result.

Async operation

What would be the effort required to have the collection work with the SDK's async operations?
i.e. when a playbook needs to loop over N networks - it would be able to run up to 10 calls in parallel.

idempotency broken on wireless ssid update

Issue

re-running the same exact play using the networks_wireless_ssids module results in a "changed/updated" state every time.

Suspected Cause

the diff that compares the current state is showing a diff in the psk, returned psk value is either masked and/or listed as unchanged

Example Diff section

psk":"************* (value did not change)",

Expected Behavior

idempotency is retained for wireless ssid updates.

Sample play

https://gitlab.com/craigerstix/ansible_meraki_beta/-/blob/main/config_ssids.yml

cisco.meraki.networks_appliance_ports is failing with "Object does not exists, plugin only has update"

cisco.meraki.networks_appliance_ports is failing too.

---

- hosts: meraki_servers
  vars:
    network_id: "L_828099381482770865"
  gather_facts: false
  tasks:

    - name: Update appliance ports
      cisco.meraki.networks_appliance_ports:
        accessPolicy: "open"
        allowedVlans: "all"
        enabled: true
        networkId: "{{network_id}}"
        portId: "2"
        type: "access"
        vlan: 3
        state: present

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None fatal: [meraki_server]: FAILED! => {"changed": false, "msg": "Object does not exists, plugin only has update"}

cisco.meraki.networks_wireless_ssids does not accept "0" as the SSID number

Hi Francisco,
Playing with a simple playbook, I discovered I can't change SSID #0.

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None fatal: [meraki_server]: FAILED! => {"changed": false, "msg": "Object does not exists, plugin only has update"}

While this works:

---

- hosts: meraki_servers
  vars:
    org_id: "828099381482762270"
    corp_name: "ACME"
    network_id: "L_828099381482770865"
  gather_facts: false
  tasks:

    - name: Create corporate SSID
      cisco.meraki.networks_wireless_ssids:
        meraki_suppress_logging: true
        state: present
        enabled: true
        name: "{{corp_name}}"
        networkId: "{{ network_id }}"
        number: "1"

This fails:

---

- hosts: meraki_servers
  vars:
    org_id: "828099381482762270"
    corp_name: "TEST"
    network_id: "L_828099381482770865"
  gather_facts: false
  tasks:

    - name: Create corporate SSID
      cisco.meraki.networks_wireless_ssids:
        meraki_suppress_logging: true
        state: present
        enabled: true
        name: "{{corp_name}}"
        networkId: "{{ network_id }}"
        number: "0"

Get organization networks

cisco.meraki.networks_info

Based on the code, this module should either provide the list of networks per organization (if an organization Id is provided), or the details of one networks (if a network ID is provided). I tried both:

Get all networks:

---

- hosts: meraki_servers
  vars:
    organization_id: 828099381482762270
  gather_facts: false
  tasks:
    - name: Get all Organization networks
      cisco.meraki.networks_info:
        meraki_suppress_logging: true
        organizationId: "{{ organization_id }}"
      register: result

    - name: Show result
      ansible.builtin.debug:
        msg: "{{ result }}"

failed with:

(ansible) Oren.Brigg@OBRIGG-M-9VFC playbooks % ansible-playbook -i hosts organization_info.yml -vvv
ansible-playbook [core 2.15.1]
  config file = None
  configured module search path = ['/Users/Oren.Brigg/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/Oren.Brigg/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/bin/ansible-playbook
  python version = 3.10.8 (main, Oct 13 2022, 09:48:40) [Clang 14.0.0 (clang-1400.0.29.102)] (/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/bin/python)
  jinja version = 3.1.2
  libyaml = True
No config file found; using defaults
host_list declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
script declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
auto declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
Parsed /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: organization_info.yml **********************************************************************************************************************************************************************************
1 plays in organization_info.yml

PLAY [meraki_servers] ********************************************************************************************************************************************************************************************

TASK [Get all Organization networks] *****************************************************************************************************************************************************************************
task path: /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/organization_info.yml:18
The full traceback is:
Traceback (most recent call last):
  File "/Users/Oren.Brigg/.ansible/collections/ansible_collections/cisco/meraki/plugins/plugin_utils/meraki.py", line 248, in exec_meraki
    family = getattr(self.api, family)
AttributeError: 'DashboardAPI' object has no attribute 'organizationsnetworks'
[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.default.CallbackModule object at 0x10440d8a0>): Object of type AttributeError is not JSON serializable
Callback Exception:
  File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/executor/task_queue_manager.py", line 468, in send_callback
    method(*new_args, **kwargs)
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/plugins/callback/default.py", line 67, in v2_runner_on_failed
    msg = "fatal: [%s]: FAILED! => %s" % (host_label, self._dump_results(result._result))
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/plugins/callback/__init__.py", line 258, in _dump_results
    return json.dumps(OrderedDict(sorted(abridged_result.items(), key=to_text)),
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 201, in encode
    chunks = list(chunks)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 438, in _iterencode
    o = _default(o)
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/module_utils/common/json.py", line 75, in default
    value = super(AnsibleJSONEncoder, self).default(o)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '

PLAY RECAP *******************************************************************************************************************************************************************************************************
meraki_server              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Get one network:

---

- hosts: meraki_servers
  vars:
    network_id: "L_828099381482771185" # Branch-1234
  gather_facts: false
  tasks:

    - name: Get all Organization networks
      cisco.meraki.networks_info:
        meraki_suppress_logging: true
        networkId: "{{ network_id }}"
      register: result

    - name: Show result
      ansible.builtin.debug:
        msg: "{{ result }}"

failed with:

(ansible) Oren.Brigg@OBRIGG-M-9VFC playbooks % ansible-playbook -i hosts organization_info.yml -vvv
ansible-playbook [core 2.15.1]
  config file = None
  configured module search path = ['/Users/Oren.Brigg/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/Oren.Brigg/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/bin/ansible-playbook
  python version = 3.10.8 (main, Oct 13 2022, 09:48:40) [Clang 14.0.0 (clang-1400.0.29.102)] (/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/bin/python)
  jinja version = 3.1.2
  libyaml = True
No config file found; using defaults
host_list declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
script declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
auto declined parsing /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts as it did not pass its verify_file() method
Parsed /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/hosts inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: organization_info.yml **********************************************************************************************************************************************************************************
1 plays in organization_info.yml

PLAY [meraki_servers] ********************************************************************************************************************************************************************************************

TASK [Get all Organization networks] *****************************************************************************************************************************************************************************
task path: /Users/Oren.Brigg/Python/ansible/meraki-ansible-test-oren/playbooks/organization_info.yml:18
The full traceback is:
Traceback (most recent call last):
  File "/Users/Oren.Brigg/.ansible/collections/ansible_collections/cisco/meraki/plugins/plugin_utils/meraki.py", line 248, in exec_meraki
    family = getattr(self.api, family)
AttributeError: 'DashboardAPI' object has no attribute 'organizationsnetworks'
[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.default.CallbackModule object at 0x104b7d8a0>): Object of type AttributeError is not JSON serializable
Callback Exception:
  File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/executor/task_queue_manager.py", line 468, in send_callback
    method(*new_args, **kwargs)
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/plugins/callback/default.py", line 67, in v2_runner_on_failed
    msg = "fatal: [%s]: FAILED! => %s" % (host_label, self._dump_results(result._result))
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/plugins/callback/__init__.py", line 258, in _dump_results
    return json.dumps(OrderedDict(sorted(abridged_result.items(), key=to_text)),
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 201, in encode
    chunks = list(chunks)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 438, in _iterencode
    o = _default(o)
   File "/Users/Oren.Brigg/.local/share/virtualenvs/ansible-tkGtej5D/lib/python3.10/site-packages/ansible/module_utils/common/json.py", line 75, in default
    value = super(AnsibleJSONEncoder, self).default(o)
   File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '

PLAY RECAP *******************************************************************************************************************************************************************************************************
meraki_server              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Kindly update the user-agent string

The collection is currently using python-meraki/1.34.0%7B%22implementation%22%3A%20%7B%22name%22%3A%20%22CPython%22%2C%20%22version%22%3A%20%223.10.8%22%7D%2C%20%22distro%22%3A%20%7B%2 2name%22%3A%20%22macOS%22%2C%20%22version%22%3A%20%2213.4.1%22%7D%2C%20%22system%22%3A%20%7B%22name%22%3A%20%22Darwin%22%2C%20%22release%22%3A%20%2222 .5.0%22%7D%2C%20%22cpu%22%3A%20%22arm64%22%7D

I'll double-check with John on my team, we will probably want to use something like: AnsibleCollection/1.0.0 RedHat
Based on our guidelines.

worker found in a dead state

Behavior:

when using the networks_wireless_ssids module to loop through a list of ssids to configure the playbook crashes with the following error:

TASK [Configure ssids] ***********************************************************************************************************
Tuesday 11 July 2023  18:34:06 -0500 (0:00:00.098)       0:00:00.098 **********
objc[61686]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[61686]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
ERROR! A worker was found in a dead state

Workaround

i found that if i export no_proxy="*" to my environment then the playbook executes without fail, i'm not sure why this works. I also tried limiting my forks to 1, that didnt resolve the issue though.

Environment:

playbook and inventory setup can be found here:
https://gitlab.com/craigerstix/ansible_meraki_beta/-/blob/main/config_ssids.yml

MacOS Ventura 13.4
ansible-core==2.15.1
meraki==1.34.0
Python 3.11.4

ansible.utils 2.10.3
cisco.meraki 1.0.0

Expected behavior:

should be able to execute playbook without having to configure no_proxy env

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.