Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sudo in ansible-installers repo management section. #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions installer/install_scripts/ansible-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,38 @@ enable_repositories() {
$SUDO dnf install -y epel-release
;;
centos/7)
yum install epel-release
$SUDO yum install epel-release
;;
centos/8)
dnf config-manager --set-enabled powertools
dnf install epel-release epel-next-release
$SUDO dnf config-manager --set-enabled powertools
$SUDO dnf install epel-release epel-next-release
;;
centos/9)
dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release
$SUDO dnf config-manager --set-enabled crb
$SUDO dnf install epel-release epel-next-release
;;
debian/12|zorin/16)
: #Does not appear that any extra repositories are needed
;;
kali/*)
sudo apt update
sudo apt install software-properties-common || sudo apt install python-software-properties
sudo add-apt-repository --yes --update ppa:ansible/ansible
$SUDO apt update
$SUDO apt install software-properties-common || sudo apt install python-software-properties
$SUDO add-apt-repository --yes --update ppa:ansible/ansible
;;
ol/*) #Oracle linux, which is also the base for security onion 2470
:
;;
rhel/7)
subscription-manager repos --enable rhel-*-optional-rpms --enable rhel-*-extras-rpms --enable rhel-ha-for-rhel-*-server-rpms
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$SUDO subscription-manager repos --enable rhel-*-optional-rpms --enable rhel-*-extras-rpms --enable rhel-ha-for-rhel-*-server-rpms
$SUDO yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
;;
rhel/8)
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$SUDO subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
$SUDO dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
;;
rhel/9)
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
$SUDO subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
$SUDO dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
;;
fedora/*)
: #It does not appear that fedora needs any extra repositories
Expand All @@ -118,9 +118,9 @@ enable_repositories() {
: #popos does not appear to need any extra repositories
;;
ubuntu/*)
sudo apt update
sudo apt install software-properties-common || sudo apt install python-software-properties
sudo add-apt-repository --yes --update ppa:ansible/ansible
$SUDO apt update
$SUDO apt install software-properties-common || sudo apt install python-software-properties
$SUDO add-apt-repository --yes --update ppa:ansible/ansible
;;
*)
fail "unknown OS $ID/$VERSION_ID"
Expand Down
Loading