diff options
| author | omnom62 <omnom62@outlook.com> | 2026-10-16 10:48:39 +1000 |
|---|---|---|
| committer | omnom62 <omnom62@outlook.com> | 2026-10-16 10:48:39 +1000 |
| commit | e358a865aaf6098321b6da27a6d01c3525427754 (patch) | |
| tree | bddd9ee96766a426e8bedfc31a04273765137076 /docs | |
| parent | e760e830ed88e6008d421d7005bd1cd3930b3cd4 (diff) | |
| download | vyos-documentation-e358a865aaf6098321b6da27a6d01c3525427754.tar.gz vyos-documentation-e358a865aaf6098321b6da27a6d01c3525427754.zip | |
docs: Ansible example - wrap to 80 columns, shorten an existing heading
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/configexamples/ansible.md | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/docs/configexamples/ansible.md b/docs/configexamples/ansible.md index a83d25a5..d2594b9b 100644 --- a/docs/configexamples/ansible.md +++ b/docs/configexamples/ansible.md @@ -157,7 +157,7 @@ set system name-server '192.0.2.1' ``` -## The simple way without configuration of the hostname (one task for all routers): +## The simple way without configuring the hostname (one task for all routers): ```none # nano /root/hosts_v2 @@ -210,16 +210,17 @@ vyos9 : ok=1 changed=0 unreachable=0 failed=0 s ## Backups with the vyos.blueprints collection -Regular configuration backups of many routers are a common task. Instead of writing -the playbook yourself, you can use the ready-made, tested roles of the -[vyos.blueprints](https://github.com/vyos/vyos.blueprints) collection. They work with -the inventory and variables created above. +Regular configuration backups of many routers are a common task. Instead of +writing the playbook yourself, you can use the ready-made, tested roles of the +[vyos.blueprints](https://github.com/vyos/vyos.blueprints) collection. They +work with the inventory and variables created above. ```{note} -vyos.blueprints and the vyos.vyos collection it builds on need **ansible-core 2.16 or -newer**. The Ansible packages of older Debian releases are too old; install a current -version with pip, for example in a virtual environment, together with -`ansible-pylibssh`, the SSH library Ansible uses for network devices: +vyos.blueprints and the vyos.vyos collection it builds on need **ansible-core +2.16 or newer**. The Ansible packages of older Debian releases are too old; +install a current version with pip, for example in a virtual environment, +together with `ansible-pylibssh`, the SSH library Ansible uses for network +devices: python3 -m venv /root/ansible-venv . /root/ansible-venv/bin/activate @@ -242,14 +243,15 @@ Back up every router of the inventory with one command, run from `/root`: For each router, this creates three files with the same timestamp in `/root/backups/<router>/`: -- `<router>_<timestamp>.cfg`: the configuration as shown by `show configuration`; - this is the file to restore from -- `<router>_<timestamp>.set`: the same configuration as `set` commands, for reading - and comparing -- `<router>_<timestamp>.json`: the VyOS version, model and serial number of the router +- `<router>_<timestamp>.cfg`: the configuration as shown by `show + configuration`; this is the file to restore from +- `<router>_<timestamp>.set`: the same configuration as `set` commands, for + reading and comparing +- `<router>_<timestamp>.json`: the VyOS version, model and serial number of + the router -The newest 10 backups per router are kept; older ones are removed. To change the -location or the number of backups kept: +The newest 10 backups per router are kept; older ones are removed. To change +the location or the number of backups kept: ```none # ansible-playbook vyos.blueprints.backup -i hosts -e backup_root=/srv/vyos-backups -e backup_keep=30 @@ -262,8 +264,8 @@ To back up only some routers, name a group or a host of the inventory: ``` ```{note} -Backups contain password hashes and keys. The files are created readable only by -their owner; keep the backup directory protected as well. +Backups contain password hashes and keys. The files are created readable only +by their owner; keep the backup directory protected as well. ``` In the next chapter of the example, we'll use Ansible with jinja2 |
