Ansible role to setup fstab config in OpenWRT.
- OpenWRT
- 19.07.x
- package
python3
(at least temporary) installed on target machine
Variable | Type | Default | Description |
---|---|---|---|
fstab_anon_swap | boolean | true |
(See official docs) |
fstab_anon_mount | boolean | true |
(See official docs) |
fstab_auto_swap | boolean | false |
(See official docs) |
fstab_auto_mount | boolean | false |
(See official docs) |
fstab_delay_root | boolean | 0 |
(See official docs) |
fstab_check_fs | boolean | true |
(See official docs) |
fstab_mount | list of Mount objects |
[] |
Represents Mount sections (See official docs) |
Variable | Type | Mandatory? | Default | Description |
---|---|---|---|---|
enabled | boolean | no | true |
(See official docs) |
uuid | string | yes | (See official docs) | |
target | string | no | (omitted) | (See official docs) |
- name: setup_fstab
src: https://github.com/borisskert/openwrt_fstab.git
scm: git
- hosts: test_machine
become: yes
roles:
- role: setup_fstab
- hosts: test_machine
become: yes
roles:
- role: setup_fstab
fstab_anon_swap: true
fstab_anon_mount: true
fstab_auto_swap: false
fstab_auto_mount: false
fstab_delay_root: 0
fstab_check_fs: true
fstab_mounts:
- target: /mnt/sda
uuid: f865f3ee-6369-49ba-9a19-15240b6bcb63
enabled: true
- target: /mnt/sda1
uuid: 987fc3a6-f011-44dc-829c-c9343662c777
enabled: false
- target: /mnt/sda2
uuid: 7b8daaa3-c87c-4e41-99c7-9de594951994
Requirements:
molecule test
molecule test --scenario-name with-parameters
I recommend to use pyenv for local testing. Within the Github Actions pipeline I use my own molecule Docker image.
MIT