@@ -89,12 +89,19 @@ index 68387c9..7a8ace1 100644
89
89
```console
90
90
91
91
```
92
- 2 . Add Salt repositories for our current target version (add the apt-repo and install ` salt-minion ` package)
93
- ``` console
94
- # Add the SaltStack repository key
95
- wget --quiet -O /usr/share/keyrings/salt-archive-keyring.gpg https://repo.saltproject.io/py3/ubuntu/20.04/$(dpkg --print-architecture)/3004/salt-archive-keyring.gpg
96
- # Add the SaltStack repository
97
- echo "deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://repo.saltproject.io/py3/ubuntu/20.04/$(dpkg --print-architecture)/3004 focal main" > /etc/apt/sources.list.d/salt.list
92
+ 2 . Add Salt repositories for our current target version (add the apt-repo and install ` salt-minion ` package):
93
+ > ** Note** : Ensure you are adding the correct key/repository for the version of Ubuntu you are using.
94
+ >
95
+ > See [ the Salt installation guide] ( https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html ) for more information.
96
+ ``` console
97
+ UBUNTU_VERSION=$(lsb_release -rs)
98
+ ARCH=$(dpkg --print-architecture)
99
+ CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d '=' -f 2)
100
+
101
+ echo "Adding the SaltStack repository key for $UBUNTU_VERSION $CODENAME ($ARCH)..."
102
+ sudo curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/$UBUNTU_VERSION/$ARCH/SALT-PROJECT-GPG-PUBKEY-2023.gpg
103
+ echo "Adding the SaltStack repository for $UBUNTU_VERSION $CODENAME ($ARCH)..."
104
+ echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=$ARCH] https://repo.saltproject.io/salt/py3/ubuntu/$UBUNTU_VERSION/$ARCH/latest $CODENAME main" | sudo tee /etc/apt/sources.list.d/salt.list
98
105
```
99
106
3. Install and configure the salt-minion. On `$new-host`, run the command
100
107
```console
@@ -105,15 +112,16 @@ index 68387c9..7a8ace1 100644
105
112
```console
106
113
for file in /etc/salt/minion.d/*; do echo -e "cat > $file <<EOF"; sudo cat $file; echo "EOF"; done
107
114
```
108
- 4. Restart the salt-minion service on the new host to pick up the configuration and register with salt-master:
115
+ - Copy and paste the generated commands to create and populate the files on `new-host`
116
+ 4. Restart the `salt-minion` service on the **new host** to pick up the configuration and register with salt-master:
109
117
```console
110
118
sudo salt-call service.restart
111
119
```
112
- 5. On salt-master, accept the key for the new-host:
120
+ 5. On **` salt-master`** , accept the key for the new-host:
113
121
```console
114
122
sudo salt-key -a new-host
115
123
```
116
- 6. On the new-host, run `highstate`:
124
+ 6. On the **` new-host`** , run `highstate`:
117
125
```console
118
126
sudo salt-call state.highstate
119
127
```
@@ -123,7 +131,7 @@ index 68387c9..7a8ace1 100644
123
131
ssh -L 4646:127.0.0.1:4646 lb-a.nyc1.psf.io
124
132
```
125
133
- Then view the `haproxy` status page in your browser [`http://localhost:4646/haproxy?stats`][loadbalancer]
126
- 9. Run `hightstate` on the salt-master to create a public dns record for the new- host
134
+ 9. Run `hightstate` on the ` salt-master` to create a public dns record for the new host
127
135
```console
128
136
sudo salt-call state.highstate
129
137
```
0 commit comments