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: Remove intca symlink on reinstall #12290

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions salt/ssl/remove.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ trusttheca:
file.absent:
- name: /etc/pki/tls/certs/intca.crt

symlinkca:
file.absent:
- name: /etc/ssl/certs/intca.crt

influxdb_key:
file.absent:
- name: /etc/pki/influxdb.key
Expand Down
6 changes: 3 additions & 3 deletions setup/so-functions
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,9 @@ reinstall_init() {
salt-call -l info saltutil.kill_all_jobs --local
fi

logCmd "salt-call state.apply ca.remove -linfo --local --file-root=../salt"
logCmd "salt-call state.apply ssl.remove -linfo --local --file-root=../salt"

# Kill any salt processes (safely)
for service in "${salt_services[@]}"; do
# Stop the service in the background so we can exit after a certain amount of time
Expand All @@ -1621,9 +1624,6 @@ reinstall_init() {
done
done

logCmd "salt-call state.apply ca.remove -linfo --local --file-root=../salt"
logCmd "salt-call state.apply ssl.remove -linfo --local --file-root=../salt"

# Remove all salt configs
rm -rf /etc/salt/engines/* /etc/salt/grains /etc/salt/master /etc/salt/master.d/* /etc/salt/minion /etc/salt/minion.d/* /etc/salt/pki/* /etc/salt/proxy /etc/salt/proxy.d/* /var/cache/salt/

Expand Down
Loading