Added evobackup sync when more than one host
This commit is contained in:
parent
daad12fdeb
commit
d4742b411d
|
@ -8,3 +8,8 @@
|
||||||
- name: 'created new jail'
|
- name: 'created new jail'
|
||||||
command: "bkctld start {{ evolinux_hostname }}"
|
command: "bkctld start {{ evolinux_hostname }}"
|
||||||
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
|
|
||||||
|
- name: 'jail updated'
|
||||||
|
command: "bkctld start {{ evolinux_hostname }}"
|
||||||
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
|
when: evobackup_client__hosts|length > 1
|
||||||
|
|
|
@ -6,24 +6,43 @@
|
||||||
creates: "/backup/jails/{{ evolinux_hostname }}/"
|
creates: "/backup/jails/{{ evolinux_hostname }}/"
|
||||||
become: true
|
become: true
|
||||||
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
notify: 'created new jail'
|
notify:
|
||||||
|
- 'created new jail'
|
||||||
|
- 'jail updated'
|
||||||
|
tags:
|
||||||
|
- evobackup_client
|
||||||
|
- evobackup_client_jail
|
||||||
|
|
||||||
- name: 'add ssh key to jail'
|
- name: 'add ssh key to jail'
|
||||||
command: "bkctld key {{ evolinux_hostname }} /root/{{ evolinux_hostname }}.pub"
|
command: "bkctld key {{ evolinux_hostname }} /root/{{ evolinux_hostname }}.pub"
|
||||||
become: true
|
become: true
|
||||||
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
|
notify: 'jail updated'
|
||||||
|
tags:
|
||||||
|
- evobackup_client
|
||||||
|
- evobackup_client_jail
|
||||||
|
|
||||||
- name: 'add ip to jail'
|
- name: 'add ip to jail'
|
||||||
command: "bkctld ip {{ evolinux_hostname }} {{ ansible_host }}"
|
command: "bkctld ip {{ evolinux_hostname }} {{ ansible_host }}"
|
||||||
become: true
|
become: true
|
||||||
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
|
notify: 'jail updated'
|
||||||
|
tags:
|
||||||
|
- evobackup_client
|
||||||
|
- evobackup_client_jail
|
||||||
|
|
||||||
- name: 'get jail port'
|
- name: 'get jail port'
|
||||||
command: "bkctld port {{ evolinux_hostname }}"
|
command: "bkctld port {{ evolinux_hostname }}"
|
||||||
become: true
|
become: true
|
||||||
register: bkctld_port
|
register: bkctld_port
|
||||||
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
delegate_to: "{{ evobackup_client__hosts[0].ip }}"
|
||||||
|
tags:
|
||||||
|
- evobackup_client
|
||||||
|
- evobackup_client_jail
|
||||||
|
|
||||||
- name: 'register jail port'
|
- name: 'register jail port'
|
||||||
set_fact:
|
set_fact:
|
||||||
evobackup_ssh_port={{ bkctld_port.stdout }}
|
evobackup_ssh_port={{ bkctld_port.stdout }}
|
||||||
|
tags:
|
||||||
|
- evobackup_client
|
||||||
|
- evobackup_client_jail
|
||||||
|
|
Loading…
Reference in a new issue