This commit is contained in:
Jeremy Schulman 2014-03-18 16:09:42 -04:00
Родитель 8a686234dd
Коммит 9482083e36
1 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -1,26 +1,30 @@
### `junos_install_config`
### `junos_noob_config`
### Synopsis
Install a Junos OS configuration. This could either be a complete configuration (overrite) or a "snippet" of change. The format of the file can either be Junos "set" commands, "curly-text" format, or XML format. This module uses the file extention to determine the format:
* `.xml` = XML
* `.conf` = curl-text
* `.set` = set
Check-Mode is supported.
If the configuration does not result in a change, then the "changed" flag will be `False`.
Install a minimal New Out of Box (NOOB) configuration that should at least set the IP-address and enable the NETCONF service. This action is performed over the device CONSOLE port using either a SERIAL-PORT or a TERMINAL-SERVER. This action will also log the device "facts" and "inventory" to a local server directory, which then provdies you with specific details about the device located on that console. Refer to [netconify](https://github.com/jeremyschulman/py-junos-netconify) for further details on this process.
### Example Usage
The following is a complete playbook illustrating the use of this action. The `TERMSERV` and `TERMSERVPORT` variables would be taken from the host inventory specific for each device.
````
---
- name: Junos QFX Node Device Configuration
hosts: qfx_nodes
connection: local
gather_facts: no
logfile: /usr/local/junos/log/qfx_nodes.log
tasks:
- name: Pushing banner config
junos_install_config:
host={{ inventory_hostname }}
file=/var/tmp/banner.conf
- name: QFX {{mode}}-mode
junos_noob_qfx_node:
name={{ inventory_hostname }}
port='-t={{TERMSERV}},{{TERMSERVPORT}}'
mode=node
logfile=/usr/local/junos/noob.log
savedir=/usr/local/junos/inventory
````
### Options