Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
Last active August 27, 2021 21:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ScriptAutomate/39d6e45cbcda86007750fcc042e49967 to your computer and use it in GitHub Desktop.
Save ScriptAutomate/39d6e45cbcda86007750fcc042e49967 to your computer and use it in GitHub Desktop.
Test salt on a RHEL7 vagrant box
##
# CONFIRMED WITH
# - Host OS: Pop!_OS 20.04 LTS
# - Vagrant v2.2.18
# - Box: generic/rhel7 v3.4.0
# - RHEL 7.9
# - Salt v3003.2
# - Virtualbox v6.1.18
#
# Last tested: 08/27/2021
##
# Setup RHEL7 instance
vagrant init generic/rhel7
vagrant up
vagrant ssh
# Start RHEL7 cmds
sudo rpm --import https://repo.saltproject.io/py3/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub
curl -fsSL https://repo.saltproject.io/py3/redhat/7/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo
# RHEL7 developer registration
# Get developer account subscription: https://developers.redhat.com/login
# Provides account creds for registering free subscriptions for dev purposes
# Register instance after having RHEL7 dev account
sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean
sudo subscription-manager register # This will prompt for user/pass, unless you give args
# Configures repos and subscription to allow for Python 3.6
# from rhel-7-server-rpms repo
sudo subscription-manager refresh
sudo subscription-manager attach --auto
# Install salt-minion, which will also auto-install Python 3.6 reqs
sudo yum clean expire-cache
sudo yum install salt-minion -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment