de.lehmann.automation.ansib.../README.md
2024-04-16 08:30:54 +02:00

41 lines
1.1 KiB
Markdown

# de.lehmann.automation.ansible.main
Ansible automation for proxmox server and tools
## Requirements
Some ansible roles are necessary. Run galaxy installer to get the latest role versions
```bash
ansible-galaxy install -f -r ./requirements.yml
```
To get access by ssh ssh config must be adjusted (vi ~/.ssh/config)
```bash
Host git.captica.de
Hostname srvweb01.captica.de
Port 1122
User tobiaslehmann
IdentityFile ~/.ssh/id_ed25519_ansible_container
```
Be sure the root ssh pub key is already installed. If not and password auth is allowed use "--ask-pass" on ansible-playbook!
## Install server
Run playbook to install the serves
```bash
ansible-playbook -v -i inventory/hosts.yml --user=root --ask-vault-pass --extra-vars '@secrets/vault.yml' playbooks/captica-automation-nodered-datalogger.yml
ansible-playbook -v -i inventory/hosts.yml --user=root --ask-vault-pass --extra-vars '@secrets/vault.yml' playbooks/captica-webserver.yml
```
or with tags
```bash
ansible-playbook -v -i inventory/hosts.yml --tags "install,gitea,gist" --user=root --ask-vault-pass --extra-vars '@secrets/vault.yml' playbooks/captica-webserver.yml
```