Coder Social home page Coder Social logo

Comments (3)

JieX19 avatar JieX19 commented on July 21, 2024

Hi @lvrfrc87,

I noticed you used the old ansible modules not Fortios Galaxy Collection. Could you try the following playbook with Fortios Galaxy Collection?

It works perfectly for my testbed of 6.0.0 and 6.2.3.

- hosts: fortigates
  connection: httpapi
  collections:
    - fortinet.fortios
  vars:
    ansible_httpapi_use_ssl: yes
    ansible_httpapi_validate_certs: no
    ansible_httpapi_port: 443
    vdom: "root"
  tasks:
  - name: Configure security zone
    fortios_system_zone:
      vdom: "{{ vdom }}"
      state: "present"
      system_zone:
        interface:
          - interface_name: "port1"
        name: "zone_test"

Please let me know if you have any questions.
Thanks,
Jie

from ansible-galaxy-fortios-collection.

lvrfrc87 avatar lvrfrc87 commented on July 21, 2024

Even with collection, is not working. Is becoming very difficult to work with this module if the only error returned is Error in repo

---
- hosts: fws
  connection: httpapi
  collections:
    - fortinet.fortios

  vars:
    username: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      31323332653735633132626163393139393535653832623161653266343137636264316339313263
      3934343661616435303265663536346164366130316134630a353863663232366265653634303666
      39643036386630383638616161663637613162343539353937356564643765353839663233656332
      6663373032326366380a666335386234623863663335623337663433653462383165396337356639
      6261
    password: !vault |
      $ANSIBLE_VAULT;1.1;AES256
      66326233326234313662393931323963666665326631653666643736636332643631316530323764
      3263656430643536346366333065613463303632626265310a333832326137636633663236336465
      30626339353938393662623132333963303961306433656466326634386263366231363261613332
      3265613362313633630a356563363363396361353430633862646362303033336636326239613564
      31363131663030386361633534663965373161663936353061366339396535633939
    vdom: 'root'
    ssl_verify: false
    state: 'present'

  tasks:
    - name: CONFIG | Configure security zone.
      fortios_system_zone:
        host: "{{ inventory_hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        vdom:  "BLUE"
        state: "{{ state }}"
        ssl_verify: "{{ ssl_verify }}"
        system_zone:
          interface:
            - interface_name: "core_blue_transit_v1666"
          name: "z_blue_t666"
TASK [CONFIG | Configure security zone.] ***************************************
fatal: [fw1a_prd_r3b15_ams7.nee.tmcs]: FAILED! => {
    "changed": false,
    "meta": {
        "build": 1637,
        "error": -3,
        "http_method": "POST",
        "http_status": 500,
        "name": "zone",
        "path": "system",
        "revision": "529f43721407f274dd4f5b1fe9ab4589",
        "revision_changed": false,
        "serial": "FGT31D3Z15800162",
        "status": "error",
        "vdom": "BLUE",
        "version": "v6.4.1"
    }
}

MSG:

Error in repo

from ansible-galaxy-fortios-collection.

lvrfrc87 avatar lvrfrc87 commented on July 21, 2024

I will raise this with Fortigate support. Thanks for your help anyway

from ansible-galaxy-fortios-collection.

Related Issues (20)

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.