W3cubDocs

/Ansible

fortinet.fortios.fortios_switch_controller_location – Configure FortiSwitch location services in Fortinet’s FortiOS and FortiGate.

Note

This plugin is part of the fortinet.fortios collection (version 2.1.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortios.

To use it in a playbook, specify: fortinet.fortios.fortios_switch_controller_location.

New in version 2.10: of fortinet.fortios

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify switch_controller feature and location category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

Parameters

Parameter Choices/Defaults Comments
access_token
string
Token-based authentication. Generated from GUI of Fortigate.
enable_log
boolean
    Choices:
  • no
  • yes
Enable/Disable logging for task.
state
string / required
    Choices:
  • present
  • absent
Indicates whether to create or remove the object.
switch_controller_location
dictionary
Configure FortiSwitch location services.
address_civic
dictionary
Configure location civic address.
additional
string
Location additional details.
additional_code
string
Location additional code details.
block
string
Location block details.
branch_road
string
Location branch road details.
building
string
Location building details.
city
string
Location city details.
city_division
string
Location city division details.
country
string
The two-letter ISO 3166 country code in capital ASCII letters eg. US, CA, DK, DE.
country_subdivision
string
National subdivisions (state, canton, region, province, or prefecture).
county
string
County, parish, gun (JP), or district (IN).
direction
string
Leading street direction.
floor
string
Floor.
landmark
string
Landmark or vanity address.
language
string
Language.
name
string
Name (residence and office occupant).
number
string
House number.
number_suffix
string
House number suffix.
parent_key
string
Parent key name.
place_type
string
Placetype.
post_office_box
string
Post office box (P.O. box).
postal_community
string
Postal community name.
primary_road
string
Primary road name.
road_section
string
Road section.
room
string
Room number.
script
string
Script used to present the address information.
seat
string
Seat number.
street
string
Street.
street_name_post_mod
string
Street name post modifier.
street_name_pre_mod
string
Street name pre modifier.
street_suffix
string
Street suffix.
sub_branch_road
string
Sub branch road name.
trailing_str_suffix
string
Trailing street suffix.
unit
string
Unit (apartment, suite).
zip
string
Postal/zip code.
coordinates
dictionary
Configure location GPS coordinates.
altitude
string
+/- Floating point no. eg. 117.47.
altitude_unit
string
    Choices:
  • m
  • f
m ( meters), f ( floors).
datum
string
    Choices:
  • WGS84
  • NAD83
  • NAD83/MLLW
WGS84, NAD83, NAD83/MLLW.
latitude
string
Floating point start with ( +/- ) or end with ( N or S ) eg. +/-16.67 or 16.67N.
longitude
string
Floating point start with ( +/- ) or end with ( E or W ) eg. +/-26.789 or 26.789E.
parent_key
string
Parent key name.
elin_number
dictionary
Configure location ELIN number.
elin_num
string
Configure ELIN callback number.
parent_key
string
Parent key name.
name
string / required
Unique location item name.
vdom
string
Default:
"root"
Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit.

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure FortiSwitch location services.
    fortios_switch_controller_location:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      switch_controller_location:
        address_civic:
            additional: "<your_own_value>"
            additional_code: "<your_own_value>"
            block: "<your_own_value>"
            branch_road: "<your_own_value>"
            building: "<your_own_value>"
            city: "<your_own_value>"
            city_division: "<your_own_value>"
            country: "<your_own_value>"
            country_subdivision: "<your_own_value>"
            county: "<your_own_value>"
            direction: "<your_own_value>"
            floor: "<your_own_value>"
            landmark: "<your_own_value>"
            language: "<your_own_value>"
            name: "default_name_18"
            number: "<your_own_value>"
            number_suffix: "<your_own_value>"
            parent_key: "<your_own_value>"
            place_type: "<your_own_value>"
            post_office_box: "<your_own_value>"
            postal_community: "<your_own_value>"
            primary_road: "<your_own_value>"
            road_section: "<your_own_value>"
            room: "<your_own_value>"
            script: "<your_own_value>"
            seat: "<your_own_value>"
            street: "<your_own_value>"
            street_name_post_mod: "<your_own_value>"
            street_name_pre_mod: "<your_own_value>"
            street_suffix: "<your_own_value>"
            sub_branch_road: "<your_own_value>"
            trailing_str_suffix: "<your_own_value>"
            unit: "<your_own_value>"
            zip: "<your_own_value>"
        coordinates:
            altitude: "<your_own_value>"
            altitude_unit: "m"
            datum: "WGS84"
            latitude: "<your_own_value>"
            longitude: "<your_own_value>"
            parent_key: "<your_own_value>"
        elin_number:
            elin_num: "<your_own_value>"
            parent_key: "<your_own_value>"
        name: "default_name_48"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
build
string
always
Build number of the fortigate image

Sample:
1547
http_method
string
always
Last method used to provision the content into FortiGate

Sample:
PUT
http_status
string
always
Last result given by FortiGate on last operation applied

Sample:
200
mkey
string
success
Master key (id) used in the last call to FortiGate

Sample:
id
name
string
always
Name of the table used to fulfill the request

Sample:
urlfilter
path
string
always
Path of the table used to fulfill the request

Sample:
webfilter
revision
string
always
Internal revision number

Sample:
17.0.2.10658
serial
string
always
Serial number of the unit

Sample:
FGVMEVYYQT3AB5352
status
string
always
Indication of the operation's result

Sample:
success
vdom
string
always
Virtual domain used

Sample:
root
version
string
always
Version of the FortiGate

Sample:
v5.6.3


Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/fortinet/fortios/fortios_switch_controller_location_module.html