# Push radius configuration via playbook

**URL:** <https://forum.ansible.com/t/push-radius-configuration-via-playbook/44359>\
**Category:** Get Help\
**Tags:** cisco, docker\
**Created:** [August 22, 2025, 5:15pm UTC](https://forum.ansible.com/t/push-radius-configuration-via-playbook/44359 "2025-08-22T17:15:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahd320](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@noahd320](https://forum.ansible.com/u/noahd320)\
**Post date:** [August 22, 2025, 5:15pm UTC](https://forum.ansible.com/t/push-radius-configuration-via-playbook/44359/1 "2025-08-22T17:15:06Z")

</div>

I have ansible running on a docker container on my companies air gapped system. I want to push our radius configuration to all of the switches via a playbook however I am having no luck searching this up online.

I found this on a cisco forum but got an error of {“changed”: false, “module\_stderr”:

followed by the command I ran. At the end there is an error that reads “MODULE FAILURE: No start of json char found”

Here is the code I ran, but with no variable. I set my radius server IP in the {{“OTHER IP”}} spot and my secret key in the {{“KEY ONE”}}

- name: SET RADUIS  
ios\_config:  
commands:  
-radius-server host {{“OTHER IP”}} auth-port 1812 acct-port 1813 key 7 {{“KEY ONE”}}

I do have another task that is executing on the target host switch and it is successful.

---

<div class="post-metadata">

**Author:** ![Lyle\_McKarns](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lyle_mckarns/32/8142_2.png) [@Lyle\_McKarns](https://forum.ansible.com/u/Lyle_McKarns)\
**Post date:** [August 22, 2025, 5:27pm UTC](https://forum.ansible.com/t/push-radius-configuration-via-playbook/44359/2 "2025-08-22T17:27:28Z")

</div>

This looks like you’re mixing `cisco.ios.ios_command` and `cisco.ios.ios_config` module syntaxes. Based on the [command examples](https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_command_module.html#examples) I’d try something like this:

```auto
- name: SET RADUIS
  cisco.ios.ios_command:
    commands:
      - radius-server host "{{OTHER IP}}" auth-port 1812 acct-port 1813 key 7 "{{KEY ONE}}"

```

I can’t tell how much of your formatting the forum software ate, and how much of it might need help, but it did look like you had your quotes/mustaches in the wrong order ({{“”}} instead of “{{}}”)

---

<div class="post-metadata">

**Author:** ![noahd320](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@noahd320](https://forum.ansible.com/u/noahd320)\
**Post date:** [August 27, 2025, 12:59pm UTC](https://forum.ansible.com/t/push-radius-configuration-via-playbook/44359/3 "2025-08-27T12:59:32Z")

</div>

Lyle,

Ok I’ll check that out! Sorry a newbie here. I did some more researching and see that ios.command sends strings as commands through top level mode (config t). So I did this and was able to set the radius server however now I get a failure when I run the line

aaa group server radius PRIMARY

because this takes me from config t into a mode of (config-sg-radius).

Do you know a way to work around this so I can set the server name for my primary and secondary radius servers?
