From af61b7f97d45505a45c4b854df2183839c64e94f Mon Sep 17 00:00:00 2001 From: Patrick Marchand Date: Thu, 16 Jan 2020 12:18:51 +0100 Subject: [PATCH] Temp fix for regression introduced by bkctld 2.x The erroneous error codes returned by bkctld will make playbooks fail even though the commands run succesfully. See https://gitea.evolix.org/evolix/evobackup/issues/31 --- evobackup-client/tasks/jail.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/evobackup-client/tasks/jail.yml b/evobackup-client/tasks/jail.yml index 53609a63..82607705 100644 --- a/evobackup-client/tasks/jail.yml +++ b/evobackup-client/tasks/jail.yml @@ -12,11 +12,24 @@ - evobackup_client - evobackup_client_jail -- name: 'add ssh key to jail' - command: "bkctld key {{ evolinux_hostname }} /root/{{ evolinux_hostname }}.pub" +- name: 'create jail' + command: "bkctld init {{ evolinux_hostname }}" + args: + creates: "/backup/jails/{{ evolinux_hostname }}/" + become: true + delegate_to: "{{ evobackup_client__hosts[0].ip }}" + notify: + - 'created new jail' + tags: + - evobackup_client + - evobackup_client_jail + +# temp fix for bkctld 2.x because the ip and key command return 1 +# if the jail is not started, see https://gitea.evolix.org/evolix/evobackup/issues/31 +- name: 'start jail' + command: "bkctld restart {{ evolinux_hostname }}" become: true delegate_to: "{{ evobackup_client__hosts[0].ip }}" - notify: 'jail updated' tags: - evobackup_client - evobackup_client_jail