Skip to content

check_mode suppor #40

@Ofthestreet

Description

@Ofthestreet

In borg-client.yml, running the playbook in check mode is not possible since sshkey is undefined in the following task

- name: client | put sshpubkey on the normal backupserver
  authorized_key:
    user: "{{ item.user }}"
 ->   key: "{{ sshkey.stdout }}"

I would suggest to add a check_mode: no when fetching the ssh-key in order to validate the usage of sshkey.stdout

- name: client | fetch ssh-key
  command: "cat {{ borgbackup_ssh_key }}.pub"
  register: sshkey
  changed_when: false
  -> check_mode: no
  tags:
    - skip_ansible_lint

Note : As I am not a old ansible coder feel free to indicate why this is not already the case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions