Script to convert yaml to fstab compatible format

Sasan Torabkheslat e8faa549d5 Fix Readme typo error 2 years ago
LICENSE 9547da2fe8 add LICENSE 2 years ago
Makefile 981c4a5b5c rename Readme 2 years ago
README.md e8faa549d5 Fix Readme typo error 2 years ago
data.yaml c79abe479e Fix typo error 2 years ago
yaml2fstab.py c79abe479e Fix typo error 2 years ago

README.md

YAML to fstab

It's Challenge for Platform Engineering Role of Adjust company

It a python script to convert yaml file to fstab compatible format

Features

  • Verify file before fstab modification
  • Clean modified data from fstab
  • Add parsed data to fstab
  • Parse yaml from yaml file

Install

this script required python3 and pyyaml

  • CentOS/RHEL:
    • yum install PyYAML
  • Debian/Ubuntu:
    • apt insatll python3-yaml
  • pipe:
    • pip3 install pyyaml
Note: change /tmp/fstab to /etc/fstab in main script

Usage

  • put yaml file next to yaml2fstab.py
  • run make check to verify requirements before running
  • run make parse to see parsed data
  • run make verify to verify parsed data before installing you should see 0 parse errors to ensure everything is OK.
  • run make install to add parsed data to /etc/fstab

Uninstall

  • run make uninstall to remove modifications made by this script from /etc/fstab