Ansible role that installs packages on OpenWRT device.
None
Packages to be installed on OpenWRT device are defined in openwrt_config_packages
variable.
openwrt_config_packages:
- diffutils
- bash
If openwrt_config_packages
configuration variable is not present - no changes are made by role.
This role depends on Ansible role gekmihesg.openwrt
which allows to manage OpenWRT and derivatives with Ansible but without Python.
./host_vars
./host_vars/myrouter.yml
---
openwrt_config_packages:
- diffutils
- bash
./inventory.ini
[openwrt]
myrouter
./roles
./roles/requirements.yml
---
roles:
- name: gekmihesg.openwrt
- name: pe_pe.openwrt_config_packages
./site.yml
---
- hosts: all
roles:
- role: gekmihesg.openwrt
- role: pe_pe.openwrt_config_packages
./ansible.cfg
[defaults]
# Define inventory location
inventory = ./inventory.ini
# Where to put roles downloaded from galaxy and other repos
roles_path = ./roles
# Defaults to /tmp to avoid flash wear on target device
remote_tmp = /tmp
Install roles and requirements:
ansible-galaxy role install -r roles/requirements.yml
Preview changes execution would perform on inventory:
ansible-playbook site.yml --check --diff
Execute playbook on inventory:
ansible-playbook site.yml
MIT
PePe