/ansible-vyos-module

Ansible module for vyos

GNU General Public License v3.0GPL-3.0

The vyos module accepts 'set', 'delete', and 'save' with the same syntax as configure mode for vyos. Additionally, 'config' will return the output of "showConfig --show-hide-secrets" within the variable 'changes'. One or more commands may be specified at the same time.

Example of reading in multiple lines from a file:

- vyos: "{{ lookup('file', item)}}"
  with_items: your_config_files

Modules written in languages other than python do not natively support check mode. The module 'vyos-check' emulates check mode by making the same changes but discarding them rather than committing at the end. Example:

  - vyos: "set system console device ttyS0 speed '115200'"
  - vyos-check: "set system console device ttyS0 speed '115200'"
    always_run: true

The vyos-cleanup module accepts no arguments. It will discard all currently open sessions.