fortinet-solutions-cse / 40ansible

Ansible modules and examples for Fortinet products using the REST API
https://fndn.fortinet.net
Apache License 2.0
79 stars 44 forks source link

Custom SSH Port #14

Closed victorehp17 closed 5 years ago

victorehp17 commented 6 years ago

Hi, Great module, i'm really enjoying it! Would it be possible to add support for custom SSH ports (non 22)?

migumun commented 6 years ago

Hi @victorehp17 , thanks for your comments and sorry for the late reply. At the moment only port 22 is supported but we may add support for it in the future, depending on customer/market needs and roadmap.

Also if you feel like you can code a proposal, feel free to create a pull request. We will be glad to review it. Contributions are always welcome :)

migumun commented 5 years ago

The new HTTPAPI plugin that is already developed for FortiOS already supports custom ports as it uses Ansible inventory. Localhost connection will be deprecated soon according to Ansible roadmap.

HTTPAPI will be submitted for review shortly in the next days and hopefully will be released soon.

migumun commented 5 years ago

Anyway, if you want to use a different port with the current localhost connection just add it after the host ip, using a colon:

  vars:
   host: "192.168.122.40:450"
   username: "admin"
   password: ""
   vdom: "root"
  tasks: