> For the complete documentation index, see [llms.txt](https://thorstenkramm.gitbook.io/saltstack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thorstenkramm.gitbook.io/saltstack/salt-cloud/eigene-deploymentscripte.md).

# eigene Deploymentscripte

Salt-Cloud bringt ein Deployment-Script mit, welches per SSH auf fast allen Unix-Systemen den Salt-Minion zuverlässig installiert und mit dem Master verbindet. Wenn Sie Salt-Cloud mit Ihrem "eignen" Hypervisor verwenden, z.B. KVM oder VMWare und wenn Sie die Kontrolle über die Images haben, können Sie den Salt-Minion schon im Image vorinstallieren. Das beschleunigt den Provisionierungsprozess.&#x20;

{% code title="/etc/salt/cloud.deploy.d/LinuxMinimal.sh" %}

```bash
#!/bin/sh

#
# Minimal Deploy Skript which takes an already installed Salt Minion
#
#TMP_DIR=$(echo ${BASH_SOURCE[0]}|tr -d " "|sed s/"deploy.sh"/""/)
TMP_DIR=$(set | grep -o "\/tmp\/\.saltcloud-.*\deploy.sh"|sed s/"deploy.sh"/""/g)
echo TMP_DIR=$TMP_DIR

# Keep a copy of the tmp dir for debugging
#mkdir /tmp/backup
#cp -r /tmp/.saltcloud* /tmp/backup

# Cleanup 
systemctl stop salt-minion.service
rm -f /etc/salt/minion_id 
rm -f /etc/salt/pki/minion/*
rm -f /etc/salt/minion

# change to the tmp dir salt-cloud has created
cd $TMP_DIR
ls -la
cp minion.pem /etc/salt/pki/minion/
cp minion.pub /etc/salt/pki/minion/
cp minion /etc/salt/

# Start the minion
systemctl start salt-minion.service
systemctl enable salt-minion.service

```

{% endcode %}

{% hint style="info" %}
Sollte der Ordner `/etc/salt/cloud.deploy.d/` nicht existieren, legen Sie diesen einfach an.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://thorstenkramm.gitbook.io/saltstack/salt-cloud/eigene-deploymentscripte.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
