12345678910111213141516171819202122 |
- #!/bin/bash
- pkgmanager=""
- if [[ -z "$1" ]]; then
- echo "!! box variable not set !!"
- exit 1
- fi
- if [[ "$1" == *"centos"* ]]; then
- pkgmanager="yum"
- yum install -y epel-release
- yum install -y python3 dnf policycoreutils-python python2-cryptography libselinux-python3
- yum install -y epel-release
- elif [[ "$1" == *"ubuntu"* ]]; then
- pkgmanager="apt-get"
- elif [[ "$1" == *"rocky"* ]]; then
- pkgmanager="dnf"
- dnf -y install epel-release
- dnf -y install python3 policycoreutils-python-utils python3-cryptography libselinux-python3
- else
- echo "box unsupported in provision bash common script !"
- exit 1
- fi
- #$pkgmanager install -y vim
|