This role configure linux mounts and generate /etc/fstab
.
Platform | Versions |
---|---|
Debian | all |
EL | all |
Fedora | all |
Ubuntu | all |
Ansible >= 2.13
None.
ansible-galaxy install dginhoux.fstab
git clone https://github.com/dginhoux/ansible_role.fstab dginhoux.fstab
- hosts: all
roles:
- name: start role dginhoux.fstab
ansible.builtin.include_role:
name: dginhoux.fstab
Defaults variables defined in defaults/main.yml
:
fstab_configure: true
fstab_reload: true
fstab_create_additional_dirs: true
fstab_tmpfs: false
fstab_tmpfs_options:
- nodev
- nosuid
- noatime
fstab_sysfs: true
fstab_sysfs_options:
- defaults
- noatime
fstab_proc: true
fstab_proc_options:
- defaults
- noatime
fstab_mounts:
- source: /dev/sda1
target: /boot
type: ext2
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--root
target: /
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--home
target: /home
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--opt
target: /opt
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--tmp
target: /tmp
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 0
- source: /dev/mapper/vg0-lv--usr
target: /usr
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--var
target: /var
type: xfs
options:
- defaults
- noatime
dump: false
fsck: 1
- source: /dev/mapper/vg0-lv--swap
target: none
type: swap
options:
- sw
dump: false
fsck: 0
Those variables files are located in vars/*.yml
are used to handle OS differences.
One of theses is loaded dynamically during role runtime using the include_vars
module and set OS specifics variable's.
NOT USED BY THIS ROLE
Dany GINHOUX - https://github.com/dginhoux
MIT