43 lines
881 B
YAML
43 lines
881 B
YAML
---
|
|
|
|
- block:
|
|
- name: "get '{{ rsync_executable }}' full path"
|
|
shell: >
|
|
which '{{ rsync_executable }}'
|
|
register: get_rsync_path
|
|
|
|
rescue:
|
|
- name: "install Rsync packages"
|
|
become: true
|
|
package:
|
|
name: rsync
|
|
|
|
- name: "get '{{ rsync_executable }}' full path"
|
|
shell: >
|
|
which '{{ rsync_executable }}'
|
|
register: get_rsync_path
|
|
|
|
|
|
- name: "update rsync_executable fact"
|
|
set_fact:
|
|
rsync_executable: '{{ get_rsync_path.stdout_lines | first }}'
|
|
|
|
|
|
- name: "get Rsync version"
|
|
command: >
|
|
'{{ rsync_executable }}' --version
|
|
register:
|
|
get_rsync_version
|
|
|
|
|
|
- name: update rsync_version fact
|
|
set_fact:
|
|
rsync_version: '{{ get_rsync_version.stdout_lines | first }}'
|
|
|
|
|
|
- name: "show Rsync facts"
|
|
debug:
|
|
msg:
|
|
rsync_executable: '{{ rsync_executable }}'
|
|
rsync_version: '{{ rsync_version }}'
|