added ansible for deployment in private infrastrucutre

This commit is contained in:
2021-05-21 12:44:15 +04:00
parent 64bc064e56
commit 616f161c36
51 changed files with 864 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
---
# Configure the rsync daemon on the master
- name: copy rsync.conf up to the server
copy:
src: "{{ rsync.config_file.src }}"
dest: "{{ rsync.config_file.dest }}"
notify:
- restart the rsync service
when: inventory_hostname == rsync.master
- name: configure rsync on the server
service:
enabled: yes
name: "{{ rsync.service_name }}"
state: started
when: inventory_hostname == rsync.master
# Synchronize the data folder across hosts
- name: synchronize the data folder
delegate_to: "{{ rsync.master }}"
synchronize:
src: "{{ sync.source }}"
dest: "{{ sync.destination }}"
rsync_opts: "{{ rsync.options }}"
use_ssh_args: yes
when: inventory_hostname != rsync.master