Skip to content

Commit 187694c

Browse files
committed
Update salt to 3005 release; clean garbage in master config
1 parent 891d8c7 commit 187694c

File tree

1 file changed

+23
-55
lines changed

1 file changed

+23
-55
lines changed

install.sh

Lines changed: 23 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,80 +7,48 @@ UBUNTU_CODENAME=$(grep -F VERSION_CODENAME /etc/os-release | cut -d= -f2)
77

88
apt-get update
99
apt-get dist-upgrade -y
10-
apt-get install wget gnupg add-apt-key -y
10+
apt-get install wget gnupg -y
1111

12-
wget -qO- "https://repo.saltstack.com/py3/ubuntu/${UBUNTU_VERSION}/amd64/latest/SALTSTACK-GPG-KEY.pub" | apt-key add -
12+
wget -qO /usr/share/keyrings/salt-archive-keyring.gpg "https://repo.saltproject.io/salt/py3/ubuntu/${UBUNTU_VERSION}/amd64/latest/salt-archive-keyring.gpg"
1313

14-
cat <<EOF > /etc/apt/sources.list.d/saltstack.list
15-
deb [arch=amd64] http://repo.saltstack.com/py3/ubuntu/${UBUNTU_VERSION}/amd64/latest ${UBUNTU_CODENAME} main
14+
if [[ -f /etc/apt/sources.list.d/saltstack.list ]]; then rm -f /etc/apt/sources.list.d/saltstack.list; fi
15+
16+
cat <<EOF > /etc/apt/sources.list.d/salt.list
17+
deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] https://repo.saltproject.io/salt/py3/ubuntu/${UBUNTU_VERSION}/amd64/latest ${UBUNTU_CODENAME} main
1618
EOF
1719

20+
apt-get update
1821
apt-get install salt-master salt-minion -y
1922

2023
cat <<EOF > /etc/salt/master
21-
file_roots:
22-
base:
23-
- /srv/salt
24-
- /srv/formulas
25-
- /srv/formulas/salt-formula
26-
- /srv/formulas/cron-formula
27-
- /srv/formulas/nginx-formula
28-
- /srv/formulas/php-formula
29-
- /srv/formulas/supervisor-formula
30-
- /srv/formulas/users-formula
31-
- /srv/formulas/logrotate-formula
32-
33-
pillar_roots:
34-
base:
35-
- /srv/pillar
36-
37-
top_file_merging_strategy: "merge"
38-
39-
fileserver_backend:
40-
- git
41-
- roots
42-
24+
fileserver_backend: git
4325
gitfs_provider: gitpython
26+
gitfs_saltenv_whitelist: base
27+
gitfs_update_interval: 80
4428
4529
gitfs_remotes:
46-
- https://github.com/saltstack-formulas/salt-formula.git:
47-
- base: master
48-
- https://github.com/saltstack-formulas/cron-formula.git:
49-
- base: master
50-
- https://github.com/saltstack-formulas/nginx-formula.git:
51-
- base: master
52-
- https://github.com/saltstack-formulas/php-formula.git:
53-
- base: master
54-
- https://github.com/saltstack-formulas/supervisor-formula.git:
55-
- base: master
56-
- https://github.com/saltstack-formulas/users-formula.git:
57-
- base: master
58-
- https://github.com/saltstack-formulas/logrotate-formula.git:
59-
- base: master
30+
- https://github.com/saltstack-formulas/salt-formula.git
31+
- https://github.com/saltstack-formulas/cron-formula.git
32+
- https://github.com/saltstack-formulas/nginx-formula.git
33+
- https://github.com/saltstack-formulas/php-formula.git
34+
- https://github.com/saltstack-formulas/supervisor-formula.git
35+
- https://github.com/saltstack-formulas/users-formula.git
36+
- https://github.com/saltstack-formulas/logrotate-formula.git
6037
- https://github.com/opensourcewebsite-org/osw-devops.git:
6138
- root: salt
62-
- base: master
6339
40+
pillarenv_from_saltenv: True
41+
git_pillar_root: pillar
6442
ext_pillar:
6543
- git:
66-
- https://github.com/opensourcewebsite-org/osw-devops.git:
67-
- root: pillar
68-
69-
git_pillar_env: "base"
70-
71-
git_pillar_root: "pillar"
72-
73-
gitfs_saltenv_whitelist:
74-
base
75-
gitfs_update_interval:
76-
80
44+
- https://github.com/opensourcewebsite-org/osw-devops.git
7745
EOF
7846

47+
salt-pip install -y GitPython
48+
7949
systemctl restart salt-master
8050

81-
cat <<EOF > /etc/salt/minion_id
82-
opensourcewebsite.org
83-
EOF
51+
echo 'opensourcewebsite.org' > /etc/salt/minion_id
8452

8553
if ! grep -Fq 'master: 127.0.0.1' /etc/salt/minion; then
8654
echo 'master: 127.0.0.1' >> /etc/salt/minion

0 commit comments

Comments
 (0)