homeserver/roles/mgrote_pbs_pve_integration/tasks/main.yml
Michael Grote 28f22968da
Some checks failed
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/push/ansible-lint Pipeline was successful
ci/woodpecker/push/ansible-playbook Pipeline failed
ci: deploy config on merge or push (#127)
Reviewed-on: #127
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

ci: testing deployment (#128)

Reviewed-on: #128
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

ci: test

ci: enable deployment

ci: set ssh-key for deployment

ci: debug

ci: deactivate ansible-lint temporarily

ci: deactivate ansible-galaxy temporarily

ci: debug ssh-key shell redirect

ci: base64

ci: debug

ci: debug

ci: fix output

Revert "ci: deactivate ansible-lint temporarily"

This reverts commit 6729342f26.

ci: fix vault-pass secret

pbs_integration: enable no_log

ci: debug ansible-vault

ci: debug

ci: ansible-vault + move to viczem.keepass (#130)

Reviewed-on: #130
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>

ff

plugin umbennennugn

ff
2024-07-09 22:27:57 +02:00

24 lines
874 B
YAML

---
- name: check which storages exists
become: true
ansible.builtin.shell:
cmd: "set -o pipefail && pvesm status | awk '{ print $1}'"
executable: /bin/bash
register: storages
changed_when: false
- name: ensure datastore exist # noqa no-changed-when
become: true
ansible.builtin.command: "pvesm add pbs {{ item.name }} --server {{ item.server }} --datastore {{ item.datastore }} --username {{ item.username }} --password {{ item.password }} --fingerprint {{ item.fingerprint }}"
loop: "{{ pve_pbs_datastore }}"
when: "item.name not in storages.stdout"
no_log: true
- name: ensure datastore is configured
become: true
ansible.builtin.command: "pvesm set {{ item.name }} --username {{ item.username }} --password {{ item.password }}"
loop: "{{ pve_pbs_datastore }}"
when: "item.name in storages.stdout"
changed_when: false
no_log: true