-
Notifications
You must be signed in to change notification settings - Fork 33
Description
your script is not correct for installing containerlab and ansible on a redhat(rpm) based OS. It should be as follows:
Install ContainerLab
echo "--- Installing ContainerLab ---"
LATEST_RELEASE=$(curl -s https://api.github.com/repos/srl-labs/containerlab/releases/latest | grep "tag_name" | cut -d : -f 2,3 | tr -d " | tr -d , | tr -d " ")
echo "Installing ContainerLab version: $LATEST_RELEASE"
cd /tmp
if [[ $PM == "apt" ]]; then
echo "deb [trusted=yes] https://netdevops.fury.site/apt/ /" |
sudo tee -a /etc/apt/sources.list.d/netdevops.list
sudo apt update && sudo apt install containerlab
else
sudo dnf config-manager -y --add-repo "https://netdevops.fury.site/yum/" &&
echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/netdevops.fury.site_yum_.repo
sudo dnf -y install containerlab
fi
cd -
containerlab version
Install Ansible
echo "--- Installing Ansible ---"
if [[ $PM == "apt" ]]; then
sudo apt install -y ansible
else
sudo $PM install -y ansible-core
fi