fuel-octane/deployment/puppet/octane_tasks/manifests/rsync_octane_section.pp
Pavel Chechetin 90af105bdb Automated configuration of rsyncd
Automated configuration (using custom graph feature) is added.
rsyncd.conf is configurated using Augeas resource in Puppet as
an elegent solution which doesn't interfere with existing
configuration by Fuel bootstrap.

It adds two Rsync section: octane_code, octane_data.

RPM spec is also updated to incorporate octane_tasks Puppet module
into Octane package and set Rsync up.

Untapped controller group is deleted from upgrade-db-orig graph.

Change-Id: Ia8ea7214b0b93f414d1de9b07a48e1602c0d2ae3
2016-08-17 17:29:02 +03:00

41 lines
1006 B
Puppet

# == Class: octane_tasks::rsync_octane_section
#
# This class adds two section to rsyncd.conf for Octane:
# Code with with ready only access.
# Data with read and write access.
class octane_tasks::rsync_octane_section {
augeas { 'rsync_octane_section_code':
context => '/files/etc/rsyncd.conf/octane_code',
changes => [
'set path /var/www/nailgun/octane_code',
'set read\ only true',
'set uid 0',
'set gid 0',
'set use\ chroot no',
]
}
augeas { 'rsync_octane_section_data':
context => '/files/etc/rsyncd.conf/octane_data',
changes => [
'set path /var/www/nailgun/octane_data',
'set read\ only false',
'set use\ chroot no',
]
}
$admin_network = hiera_hash('ADMIN_NETWORK')
$admin_ip = $admin_network['ipaddress']
augeas { 'xinetd_rsync':
context => '/files/etc/xinetd.d/rsync/service',
notify => Service['xinetd'],
changes => [
"set bind ${admin_ip}",
]
}
service { 'xinetd': }
}