Creating a utility to process that YAML and output an /etc/fstab file based on that yaml. Please provide your code along with a README describing the use. You are free to use languages and environments regarding a system of your choice but the tasks must run on a Linux system. Note: You should use a programming/scripting language to achieve this task, and not Ansible or such.
Suppose we have a YAML file describing the mount points of a system as follows.
fstab:
/dev/sda1:
mount: /boot
type: xfs
/dev/sda2:
mount: /
type: ext4
/dev/sdb1:
mount: /var/lib/postgresql
type: ext4
root-reserve: 10%
192.168.4.5:
mount: /home
export: /var/nfs/home
type: nfs
options:
- noexec
- nosuid
python3.0 or greater
To setup some Prerequisites please run install_requirments.sh
To start befor running fstab_change pyhton program make sure you have pyhton 3.0 or greater
- Clone the repo
git clone https://github.com/salehhoushangi/Adjust-GmbH.git
- Run install_requirments.sh shellscript
sudo bash install_requirments.sh
- Run ftsab_change with pyhton on your system
pyhton fstab_change.py
This program is be used to read configuration from yaml file then write it in /etc/fstab file
- Add Changelog
- Add Automation mount or remount after change
Distributed under the Adjust License. See LICENSE.txt
for more information.
Project Link: [https://github.com/salehhoushangi/Adjust-GmbH]