Skip to content
Snippets Groups Projects
Commit 27702191 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Use command not shell (ansible-lint)

parent a1ec5fe8
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
generate_ssh_key: true
- name: Get public key
shell: "cat /root/.ssh/id_rsa.pub"
command: "cat /root/.ssh/id_rsa.pub"
register: hostkey
changed_when: false
......@@ -37,7 +37,9 @@
key: "{{ borgbackup_target_ip }} ssh-ed25519 {{ hostvars[borgbackup_target_host]['ansible_ssh_host_key_ed25519_public'] }}"
- name: Create Borg Repo
shell: "BORG_PASSPHRASE={{ borgbackup_key }} borg init -e repokey borgbackup@{{ borgbackup_target_ip }}:backup"
command: "borg init -e repokey borgbackup@{{ borgbackup_target_ip }}:backup"
environment:
BORG_PASSPHRASE: "{{ borgbackup_key }}"
when: not repo.stat.exists
- name: Install borgmatic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment