Fortigate and Ansible

Author
walter.steadman@oracle.com
New Member
  • Total Posts : 1
  • Reward points: 0
  • Joined: 2017/07/01 06:34:30
  • Status: offline
2019/06/18 19:42:40 (permalink)

Fortigate and Ansible

Folks,
  Does any one have an example of how to log in to a fortigate with Ansible and do something simple like getting the system status.
 
I am just trying to get a start on using ansible but none of the thousands of docs I have searched just show a basic configuration.  I have a hosts file with the management IPs of 4 fortigates and I just want to have ansible log in to the devices and run a get system status.  
 
#1

1 Reply Related Threads

    davefig
    New Member
    • Total Posts : 1
    • Reward points: 0
    • Joined: 2019/06/26 09:05:00
    • Status: offline
    Re: Fortigate and Ansible 2019/06/26 09:42:37 (permalink)
    - hosts: localhost
      gather_facts: no
      vars:
        host: "1.2.3.4"
        username: "admin"
        password: "password"
        vdom: "root"
      tasks:
      - name: "Configure Global Attributes"
        fortios_system_global:
          host: "{{ host }}"
          username: "{{ username }}"
          password: "{{ password }}"
          vdom: "{{ vdom }}"
          system_global:
            hostname: "some_name"
            timezone: "12"
     
    This is a very basic YML that sets the device name and timezone. I've not gotten very far configuring a Fortigate using Ansible. The module documentation seems to be severely lacking. (There are tons of unlisted python dependencies on many of the other modules.)
     
    I don't know why FortiNet is so far behind on cloud integrations. I have clients who would prefer to use FortiGates because of familiarity, but modules/plugins for provisioning them via Ansible and/or Terraform are nowhere near where they should be. I'd love to find out if anyone is successfully provisioning FortiGates using such tools, or if I should be looking for other vendors.
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 5.5