Skip to content

Instantly share code, notes, and snippets.

@jboero
Last active September 15, 2020 12:16
Show Gist options
  • Save jboero/c6c90c47837a2db0f6ac9095f6c733d0 to your computer and use it in GitHub Desktop.
Save jboero/c6c90c47837a2db0f6ac9095f6c733d0 to your computer and use it in GitHub Desktop.
# RPM systemd distros:
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
# APT or DEB systemd distros:
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
@elreydetoda
Copy link

if you wrapped those in something like a case statement, then people could just copy paste that script. like this:

case "$(grep ID_LIKE /etc/os-release | cut -d '=' -f 2)" in
  debian)
      echo 'debian'
    ;;
  *)
      echo not
    ;;
esac

don't know how programatic you where trying to get with that and I don't know what it is for RHEL based systems, but just wanted to mention it 😁

also, thank you all for making this!!! It makes my life so much easier now!!! 🎉 😁 🎊

@jboero
Copy link
Author

jboero commented Sep 15, 2020

True also could add config management like Puppet if you wanted to be universal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment