Skip to content
Snippets Groups Projects
Commit 45528881 authored by Amir Forsat's avatar Amir Forsat
Browse files

Merge branch 'dev' into 'master'

Added slash to path description, divided distros to separate .yml-files

See merge request !5
parents c440913b 8851bbe9
No related branches found
Tags v0.1.1
1 merge request!5Added slash to path description, divided distros to separate .yml-files
Pipeline #186752 failed
---
# tasks file for rsync-server
- name: rsyncd | install rsync
yum:
pkg: rsync
state: present
- name: rsyncd | create log directory
file:
path: /var/log/rsyncd
state: directory
- name: create share path
file:
path: "{{ item.path }}"
state: directory
owner: nobody
mode: 0775
with_items:
- "{{ rsync_server_shares }}"
- name: rsyncd | configure shares
template:
dest: /etc/rsyncd.conf
src: etc-rsyncd-conf.j2
# No need to reload, file is re-read on each client connection.
- name: rsyncd | start and enable service
service:
name: rsyncd
enabled: true
state: started
---
# tasks file for rsync-server
- name: rsyncd | install rsync
apt:
pkg:
- rsync
- net-tools
state: present
update-cache: true
when: ansible_distribution == 'Ubuntu'
- name: rsyncd | install rsync
yum:
pkg:
- rsync
- net-tools
state: present
- include_tasks: centos.yml
when: ansible_distribution == 'CentOS'
- name: rsyncd | create log directory
file:
path: /var/log/rsyncd
state: directory
- name: create share path
file:
path: "{{ item.path }}"
state: directory
owner: nobody
mode: 0775
with_items:
- "{{ rsync_server_shares }}"
- name: rsyncd | configure shares
template:
dest: /etc/rsyncd.conf
src: etc-rsyncd-conf.j2
# No need to reload, file is re-read on each client connection.
- name: rsyncd | start and enable service
service:
name: rsync
enabled: true
state: started
- include_tasks: ubuntu.yml
when: ansible_distribution == 'Ubuntu'
- name: rsyncd | start and enable service
service:
name: rsyncd
enabled: true
state: started
when: ansible_distribution == 'CentOS'
---
# tasks file for rsync-server
- name: rsync | install rsync
apt:
pkg:
- rsync
- net-tools
state: present
update-cache: true
- name: rsync | create log directory
file:
path: /var/log/rsyncd
state: directory
- name: create share path
file:
path: "{{ item.path }}"
state: directory
owner: nobody
mode: 0775
with_items:
- "{{ rsync_server_shares }}"
- name: rsync | configure shares
template:
dest: /etc/rsyncd.conf
src: etc-rsyncd-conf.j2
# No need to reload, file is re-read on each client connection.
- name: rsync | start and enable service
service:
name: rsync
enabled: true
state: started
......@@ -33,13 +33,13 @@ dont compress = {{ rsync_server_exclude_compress }}
munge symlinks = {{ rsync_server_symlinks }}
list = {{ rsync_server_list }}
read only = {{ rsync_server_readonly }}
timeout = {{ rsync_server_timeout | default('0') }}
timeout = {{ rsync_server_timeout | default('0') }}
max connections = {{ rsync_server_max_connections | default('0') }}
{% for share in rsync_server_shares %}
[{{ share.name }}]
path = {{ share.path }}
path = /{{ share.path }}
hosts allow = {{ share.hosts_allow | default('*') }}
{% if share.options is defined %}
{% if share.options.includes is defined %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment