Jérémy Lecour
ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2777|524|2253|2462|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Fully Qualified Collection Name
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
---
|
|
|
|
- name: 'create jail'
|
|
ansible.builtin.command:
|
|
cmd: "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'
|
|
ansible.builtin.command:
|
|
cmd: "bkctld restart {{ evolinux_hostname }}"
|
|
become: true
|
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
|
tags:
|
|
- evobackup_client
|
|
- evobackup_client_jail
|
|
|
|
- name: 'add ip to jail'
|
|
ansible.builtin.command:
|
|
cmd: "bkctld ip {{ evolinux_hostname }} {{ ansible_host }}"
|
|
become: true
|
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
|
notify: 'jail updated'
|
|
tags:
|
|
- evobackup_client
|
|
- evobackup_client_jail
|
|
|
|
- name: 'add key to jail'
|
|
ansible.builtin.command:
|
|
cmd: "bkctld key {{ evolinux_hostname }} /root/{{ evolinux_hostname }}.pub"
|
|
become: true
|
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
|
notify: 'jail updated'
|
|
tags:
|
|
- evobackup_client
|
|
- evobackup_client_jail
|
|
|
|
- name: 'get jail port'
|
|
ansible.builtin.command:
|
|
cmd: "bkctld port {{ evolinux_hostname }}"
|
|
become: true
|
|
register: bkctld_port
|
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
|
tags:
|
|
- evobackup_client
|
|
- evobackup_client_jail
|
|
|
|
- name: 'register jail port'
|
|
ansible.builtin.set_fact:
|
|
evobackup_ssh_port={{ bkctld_port.stdout }}
|
|
tags:
|
|
- evobackup_client
|
|
- evobackup_client_jail
|