Ansible - Unable to set Appliance Uplink WAN IPs

Solved
NeilB
Getting noticed

Ansible - Unable to set Appliance Uplink WAN IPs

Hi,

 

I'm currently trying to build out a full ansible playbook to deploy and configure devices to a desired state in a network. The issue I'm facing is that I'm unable to set the WAN Uplink IP of an MX successfully.

 

I'm using the below code but when I run it, Ansible returns the value that the object already exists when it doesn't. (Used dummy IPs for this example).

 
 
    - name: Set MX WAN 1 IP
      cisco.meraki.devices_appliance_uplinks_settings:
        state: present
        interfaces:
          wan1:
            enabled: true
            pppoe:
              enabled: false
            svis:
              ipv4:
                address: 1.2.3.4/28
                assignmentMode: static
                gateway: 1.2.3.1
                nameservers:
                  addresses:
                    - 8.8.8.8
                    - 1.1.1.1
            vlanTagging:
              enabled: false
        serial: XXXX-XXXX-XXXX
 
I tried adding in the vlanTagging and PPPOE dictionaries as well to see if that was causing the config not to apply, even tried disabling the WAN interface in the dashboard GUI and then re-running the playbook to see if actually making a change would spark it into life, but still nothing.
 
Just wondering if anyone else has faced this issue, or can advise what i might be doing wrong at all.
 
Thanks in advance.
Neil
1 Accepted Solution
NeilB
Getting noticed

This issue has since been resolved with an update to the cisco.meraki Ansible-galaxy collection to 2.21.5

View solution in original post

5 Replies 5
alemabrahao
Kind of a big deal
Kind of a big deal

If the IP settings already exist, Meraki may reject the update.

 

Use the devices_appliance_uplinks_settings_info module to fetch current settings before applying changes.

Try changing state: present to state: replaced to force an update.

Remove optional fields like pppoe and vlanTagging unless they are explicitly needed.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
NeilB
Getting noticed

Yeah I've tried that and run the verbose output when running the play and it just returns the value that i've had to manually set on the GUI.

 

state: replaced isn't an allowed value unfortunately.

 

FAILED! => {"changed": false, "msg": ["value of state must be one of: present, got: replaced"]}

 

Oren
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

Thanks for reporting this.

Kindly create an issue on the Ansible collection's GitHub repo and the team will get it fixed.

NeilB
Getting noticed

Nice one, Thanks.

 

I've created an issue on GitHub for this as requested. 

NeilB
Getting noticed

This issue has since been resolved with an update to the cisco.meraki Ansible-galaxy collection to 2.21.5

Get notified when there are additional replies to this discussion.