community.network.ig_config – Manage the configuration database on an Ingate SBC.¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ig_config
.
Requirements¶
The below requirements are needed on the host that executes this module.
ingatesdk >= 1.0.6
Parameters¶
Notes¶
Note
If
store_download
is set to True, andpath
andfilename
is omitted, the file will be stored in the current directory with an automatic filename.This module requires that the Ingate Python SDK is installed on the host. To install the SDK use the pip command from your shell
pip install ingatesdk
.
Examples¶
- name: Add/remove DNS servers
hosts: 192.168.1.1
connection: local
vars:
client_rw:
version: v1
address: "{{ inventory_hostname }}"
scheme: http
username: alice
password: foobar
tasks:
- name: Load factory defaults
community.network.ig_config:
client: "{{ client_rw }}"
factory: true
register: result
- ansible.builtin.debug:
var: result
- name: Revert to last known applied configuration
community.network.ig_config:
client: "{{ client_rw }}"
revert: true
register: result
- ansible.builtin.debug:
var: result
- name: Change the unit name
community.network.ig_config:
client: "{{ client_rw }}"
modify: true
table: misc.unitname
columns:
unitname: "Test Ansible"
register: result
- ansible.builtin.debug:
var: result
- name: Add a DNS server
community.network.ig_config:
client: "{{ client_rw }}"
add: true
table: misc.dns_servers
columns:
server: 192.168.1.21
register: result
- ansible.builtin.debug:
var: result
- name: Add a DNS server
community.network.ig_config:
client: "{{ client_rw }}"
add: true
table: misc.dns_servers
columns:
server: 192.168.1.22
register: result
- ansible.builtin.debug:
var: result
- name: Add a DNS server
community.network.ig_config:
client: "{{ client_rw }}"
add: true
table: misc.dns_servers
columns:
server: 192.168.1.23
register: last_dns
- ansible.builtin.debug:
var: last_dns
- name: Modify the last added DNS server
community.network.ig_config:
client: "{{ client_rw }}"
modify: true
table: misc.dns_servers
rowid: "{{ last_dns['add'][0]['id'] }}"
columns:
server: 192.168.1.24
register: result
- ansible.builtin.debug:
var: result
- name: Return the last added DNS server
community.network.ig_config:
client: "{{ client_rw }}"
get: true
table: misc.dns_servers
rowid: "{{ last_dns['add'][0]['id'] }}"
register: result
- ansible.builtin.debug:
var: result
- name: Remove last added DNS server
community.network.ig_config:
client: "{{ client_rw }}"
delete: true
table: misc.dns_servers
rowid: "{{ last_dns['add'][0]['id'] }}"
register: result
- ansible.builtin.debug:
var: result
- name: Return the all rows from table misc.dns_servers
community.network.ig_config:
client: "{{ client_rw }}"
get: true
table: misc.dns_servers
register: result
- ansible.builtin.debug:
var: result
- name: Remove remaining DNS servers
community.network.ig_config:
client: "{{ client_rw }}"
delete: true
table: misc.dns_servers
register: result
- ansible.builtin.debug:
var: result
- name: Get rowid for interface eth0
community.network.ig_config:
client: "{{ client_rw }}"
return_rowid: true
table: network.local_nets
columns:
interface: eth0
register: result
- ansible.builtin.debug:
var: result
- name: Store the preliminary configuration
community.network.ig_config:
client: "{{ client_rw }}"
store: true
register: result
- ansible.builtin.debug:
var: result
- name: Do backup of the configuration database
community.network.ig_config:
client: "{{ client_rw }}"
download: true
store_download: true
register: result
- ansible.builtin.debug:
var: result
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Ingate Systems AB (@ingatesystems)