mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #7713 from Security-Onion-Solutions/m0duspwnens-salt-3004.1
update update_repo function
This commit is contained in:
@@ -935,8 +935,19 @@ update_repo() {
|
|||||||
yum repolist
|
yum repolist
|
||||||
fi
|
fi
|
||||||
elif [[ "$OS" == "ubuntu" ]]; then
|
elif [[ "$OS" == "ubuntu" ]]; then
|
||||||
cp $UPDATE_DIR/salt/repo/client/files/ubuntu/$ubuntu_version/* /etc/apt/sources.list.d/
|
ubuntu_version=$(grep VERSION_ID /etc/os-release | awk -F '[ "]' '{print $2}')
|
||||||
apt-get update
|
|
||||||
|
if grep -q "UBUNTU_CODENAME=bionic" /etc/os-release; then
|
||||||
|
OSVER=bionic
|
||||||
|
elif grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
|
||||||
|
OSVER=focal
|
||||||
|
else
|
||||||
|
echo "We do not support your current version of Ubuntu."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "deb http://repo.saltstack.com/py3/ubuntu/$ubuntu_version/amd64/archive/3004.1 $OSVER main" > /etc/apt/sources.list.d/saltstack.list
|
||||||
|
apt-get update
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
deb https://repo.securityonion.net/file/securityonion-repo/ubuntu/18.04/amd64/salt/ bionic main
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
deb https://repo.securityonion.net/file/securityonion-repo/ubuntu/20.04/amd64/salt/ focal main
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
ubuntu_repo_files:
|
saltstack.list:
|
||||||
- file.recurse:
|
- file.managed:
|
||||||
- name: /etc/apt/sources.list.d/
|
- name: /etc/apt/sources.list.d/saltstack.list
|
||||||
- source: salt://repo/client/files/ubuntu/{{grains.osrelease}}/
|
- contents:
|
||||||
|
- deb https://repo.securityonion.net/file/securityonion-repo/ubuntu/{{grains.osrelease}}/amd64/salt/ {{grains.oscodename}} main
|
||||||
|
|||||||
Reference in New Issue
Block a user