Skip to content

Commit

Permalink
(SIMP-2513) Update rsync changes (#24)
Browse files Browse the repository at this point in the history

SIMP-2513 #comment freeradius changes made
SIMP-2524 #close
  • Loading branch information
jeannegreulich authored and Nick Markowski committed Jan 25, 2017
1 parent 4d2cd62 commit c602ce9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
fixtures:
repositories:
auditd: https://github.com/simp/pupmod-simp-auditd
augeasproviders_core:
repo: https://github.com/simp/augeasproviders_core
branch: simp-master
augeasproviders_grub:
repo: https://github.com/simp/augeasproviders_grub
branch: simp-master
augeasproviders_core: https://github.com/simp/augeasproviders_core
augeasproviders_grub: https://github.com/simp/augeasproviders_grub
iptables: https://github.com/simp/pupmod-simp-iptables
logrotate: https://github.com/simp/pupmod-simp-logrotate
pki: https://github.com/simp/pupmod-simp-pki
rsync: https://github.com/simp/pupmod-simp-rsync
rsyslog: https://github.com/simp/pupmod-simp-rsyslog
simpcat: https://github.com/simp/pupmod-simp-simpcat
simplib: https://github.com/simp/pupmod-simp-simplib
stdlib: https://github.com/simp/puppetlabs-stdlib
Expand Down
6 changes: 3 additions & 3 deletions manifests/v2/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@
#
class freeradius::v2::conf (
$use_rsync_radiusd_conf = false,
$rsync_source = "freeradius_${::environment}/",
$rsync_source = "freeradius_${::environment}_${facts['os']['name']}/",
$rsync_server = simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1', 'value_type' => String }),
$rsync_timeout = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => '2', 'value_type' => Stdlib::Compat::Integer }),
$rsync_timeout = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2, 'value_type' => Integer }),
$rsync_bwlimit = '',
$trusted_nets = simplib::lookup('simp_options::trusted_nets', { 'default_value' => ['127.0.0.1', '::1'], 'value_type' => Array[String] }),
$localstatedir = '/var',
$logdir = $::freeradius::config::logdir,
$expose_shadow = false,
$radius_port = 1812,
$radius_rsync_user = "freeradius_systems_${::environment}",
$radius_rsync_user = "freeradius_systems_${::environment}_${facts['os']['name'].downcase}",
$radius_rsync_password = 'nil',
$max_request_time = '30',
$cleanup_delay = '5',
Expand Down
6 changes: 3 additions & 3 deletions manifests/v3/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
$max_request_time = '30',
$max_requests = '1024',
$proxy_requests = false,
$rsync_source = "freeradius_${::environment}/",
$rsync_source = "freeradius_${::environment}_${facts['os']['name']}/",
$rsync_server = simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1', 'value_type' => String }),
$rsync_timeout = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => '2', 'value_type' => Stdlib::Compat::Integer }),
$rsync_timeout = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2, 'value_type' => Integer }),
$rsync_bwlimit = '',
$radius_ports = [1812, 1813],
$radius_rsync_user = "freeradius_systems_${::environment}",
$radius_rsync_user = "freeradius_systems_${::environment}_${facts['os']['name'].downcase}",
$radius_rsync_password = 'nil',
$regular_expressions = true,
$use_rsync_radiusd_conf = false,
Expand Down
6 changes: 4 additions & 2 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@
it { is_expected.to contain_class('rsync') }
it { is_expected.to contain_file('/etc/raddb/radiusd.conf').with_content(nil)}
it { is_expected.to contain_rsync('freeradius').with({
:source => "freeradius_#{environment}_#{facts[:os][:name]}/",
:user => "freeradius_systems_#{environment}_#{facts[:os][:name].downcase}",
:server => '127.0.0.1',
:timeout => '2'})
:timeout => 2})
}
end

Expand Down Expand Up @@ -152,7 +154,7 @@
# Not sure why this is not working
context 'with use_rsync_radiusd_conf = true' do
let(:hieradata) { "rsync_conf" }
pending("it_should_behave_like use_rsync_radiusd_conf = true'")
it_should_behave_like "use_rsync_radiusd_conf = true"
end
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/hieradata/rsync_conf.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
freeradius::v3::conf::use_rsync_radiusd_conf: true
freeradius::v2::conf::use_rsync_radiusd_conf: true

0 comments on commit c602ce9

Please sign in to comment.