# Ansible network module ios\_config dont work on my fs S3260switch

**URL:** <https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520>\
**Category:** Ansible Project\
**Created:** [July 19, 2021, 4:52pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520 "2021-07-19T16:52:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mythicale](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Mythicale](https://forum.ansible.com/u/Mythicale)\
**Post date:** [July 19, 2021, 4:52pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/1 "2021-07-19T16:52:32Z")

</div>

Hello!

I finishing my course beeing an intern on a company, and my project is switch automation with ansible.

With the cisco switch its not hard, but [fs.com](http://fs.com) switches although they are similar to cisco, dont accept some modules, like, ios\_config, and my boss ask me to try to “create” a module like ios\_config but that [fs.com](http://fs.com) accept it.

Right now when i try to use it on fs switch, it says that this operation requires privilege escalation, if i use ios\_command the operations works. Can somoene help me on how to use ios\_config like a template and change it to be able to use on [fs.com](http://fs.com)???

Best Regards,  
Tiago Oliveira

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [July 19, 2021, 5:02pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/2 "2021-07-19T17:02:03Z")

</div>

Perhaps you could show us what you currently have for this new module, so we  
have an understanding of what commands you are trying to run which require  
special privileges.

Also, any documentation you can point us to, for those of us not intimately  
familiar with fs.com switches and their remote management capabilities, would  
probably help.

Antony.

---

<div class="post-metadata">

**Author:** ![Mythicale](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Mythicale](https://forum.ansible.com/u/Mythicale)\
**Post date:** [July 19, 2021, 5:13pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/3 "2021-07-19T17:13:21Z")

</div>

I actually dont have anything of the module done.

I wanted to see the ios\_config module and how it was done so i could have an ideia of what to do… but i cant find the documentation and the how to do that module.

About the [fs.com](http://fs.com) switches, the one i am trying to use is a lot similar to cisco ios, with small diferences. for example you do enable and then config and not config terminal, and i dont know if that changes something for the module not working, because if i use ios\_command module and write all the commands: enable,config i can use this commands inside fs switch config without problems…

Tiago

A segunda-feira, 19 de julho de 2021 à(s) 18:02:30 UTC+1, Antony Stone escreveu:

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [July 19, 2021, 7:29pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/4 "2021-07-19T19:29:50Z")

</div>

> I actually dont have anything of the module done.

So, how are you getting the error "this operation requires privilege  
escalation"?

> I wanted to see the ios\_config module and how it was done so i could have  
> an ideia of what to do.. but i cant find the documentation and the how to  
> do that module.

There may only be source code. Not everyone documents the development of  
things like this in sufficient detail that other developers can understand the  
design process.

> About the fs.com switches, the one i am trying to use is a lot similar to  
> cisco ios, with small diferences. for example

Sorry, but phrases like "small differences" and "for example" are not enough to  
write software. You need specifications - you need definite documentation about  
\_exactly\_ how things need to be done.

> you do enable and then config and not config terminal, and i dont know if that  
> changes something for the module not working, because if i use ios\_command  
> module and write all the commands: enable,config i can use this commands  
> inside fs switch config without problems..

Start with something simple.

Make sure you can do one specific, simple command manually, and then get an  
ansible module to do it for you. If you need escalated privileges, well, put  
that in (I assume you already know how to do that in ansible).

Then, once you have something simple working, build up to the real goal of the  
full configuration you are trying to achieve.

If you need further help from the list, though, I really think you need to  
provide some details about what you are doing, what the errors are, and what  
the fs.com documentation says needs to be done to make something work.

Antony.

---

<div class="post-metadata">

**Author:** ![Mythicale](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Mythicale](https://forum.ansible.com/u/Mythicale)\
**Post date:** [July 20, 2021, 3:41pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/5 "2021-07-20T15:41:24Z")

</div>

> So, how are you getting the error “this operation requires privilege  
> escalation”?

I was getting this error when i try to use the ios\_config, wich is made for cisco\_ios. [Fs.com](http://Fs.com) switches base ios is cisco, but i dont know what is their ios name (if they have a name) and i cant find it anywhere. When i use ios\_command the switch accept it because this dont go further to config mode without my commands and i dont know if it a conflict because config mode in cisco is config terminal and [fs.com](http://fs.com) config mode is config only.

> There may only be source code. Not everyone documents the development of  
> things like this in sufficient detail that other developers can understand the  
> design process.

About this, im kynda new on ansible, and i cant find a “guide” on how to build a module and that is maybe the hardest part… in my course ive studied C,C++ and C# but we dont use python… although everyone says to me that if i can program with c i can easy learn python. The problem here is actually, find a ‘how to do a module guide’.

> Sorry, but phrases like “small differences” and “for example” are not enough to  
> write software. You need specifications - you need definite documentation about  
> _exactly_ how things need to be done.

Here i got a manual that i am using to see what to do when cisco commands not working (because some are different!)

PoE+ Series Switches CLI Reference Guide | FS → [https://img-en.fs.com/file/user\_manual/poe+-series-switches-cli-reference-guide.pdf](https://img-en.fs.com/file/user_manual/poe+-series-switches-cli-reference-guide.pdf)

> Start with something simple.

Make sure you can do one specific, simple command manually, and then get an  
ansible module to do it for you. If you need escalated privileges, well, put  
that in (I assume you already know how to do that in ansible).

Then, once you have something simple working, build up to the real goal of the  
full configuration you are trying to achieve.

If you need further help from the list, though, I really think you need to  
provide some details about what you are doing, what the errors are, and what  
the [fs.com](http://fs.com/) documentation says needs to be done to make something work.

So the point is to make a module to automate commands inside config mode in the s3260-8T2FP switch from [fs.com](http://fs.com), i am using an s3900-24F4S switch also from [fs.com](http://fs.com) but this one i have since yesterday so im still testing and learning how to work with it and for now it looks more similar to cisco\_ios than the other one…

I already make 2 roles that create vlans on the switch and link them with a specific port. This roles are working but the module was a better project for my internship since this roles are only working to fs with ios\_command and i have to make the commands all by myself.

If i could do a module like ios\_config but working to fs, not only i would automate even better my roles, but also i would have a better project to show in the present in the end of my internship.

Hope you guys can help me!!  
If u didnt understand something please ask me!!

A segunda-feira, 19 de julho de 2021 à(s) 20:30:16 UTC+1, Antony Stone escreveu:

---

<div class="post-metadata">

**Author:** ![chr00ted](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chr00ted/32/2188_2.png) [@chr00ted](https://forum.ansible.com/u/chr00ted)\
**Post date:** [July 26, 2021, 4:54pm UTC](https://forum.ansible.com/t/ansible-network-module-ios-config-dont-work-on-my-fs-s3260switch/35520/6 "2021-07-26T16:54:28Z")

</div>

Instead of writing a whole new module, why not try to use netcommon module: [https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli\_command\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_command_module.html)
