Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #10621: Update configuration file for migration to SETTINGS #74

Merged
merged 1 commit into from
Oct 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

file { "${katello::config_dir}/katello.yaml":
ensure => file,
content => template('katello/katello.yml.erb'),
content => template('katello/katello.yaml.erb'),
owner => $katello::user,
group => $katello::group,
mode => '0644',
Expand Down
66 changes: 33 additions & 33 deletions spec/classes/katello_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
should contain_file('/etc/foreman/plugins/katello.yaml')
content = catalogue.resource('file', '/etc/foreman/plugins/katello.yaml').send(:parameters)[:content]
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
'common:',
' rest_client_timeout: 120',
' post_sync_url: https://localhost/katello/api/v2/repositories/sync_complete?token=test_token',
' candlepin:',
' url: https://localhost:8443/candlepin',
' oauth_key: katello',
' oauth_secret: secret',
' pulp:',
" url: https://#{facts[:fqdn]}/pulp/api/v2/",
' oauth_key: katello',
' oauth_secret: secret',
' qpid:',
" url: amqp:ssl:#{facts[:fqdn]}:5671",
' subscriptions_queue_address: katello_event_queue'
':katello:',
' :rest_client_timeout: 120',
' :post_sync_url: https://localhost/katello/api/v2/repositories/sync_complete?token=test_token',
' :candlepin:',
' :url: https://localhost:8443/candlepin',
' :oauth_key: katello',
' :oauth_secret: secret',
' :pulp:',
" :url: https://#{facts[:fqdn]}/pulp/api/v2/",
' :oauth_key: katello',
' :oauth_secret: secret',
' :qpid:',
" :url: amqp:ssl:#{facts[:fqdn]}:5671",
' :subscriptions_queue_address: katello_event_queue'
]
end
end
Expand All @@ -71,25 +71,25 @@
should contain_file('/etc/foreman/plugins/katello.yaml')
content = catalogue.resource('file', '/etc/foreman/plugins/katello.yaml').send(:parameters)[:content]
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
'common:',
' rest_client_timeout: 120',
' post_sync_url: https://localhost/katello/api/v2/repositories/sync_complete?token=test_token',
' candlepin:',
' url: https://localhost:8443/candlepin',
' oauth_key: katello',
' oauth_secret: secret',
' pulp:',
" url: https://#{facts[:fqdn]}/pulp/api/v2/",
' oauth_key: katello',
' oauth_secret: secret',
' qpid:',
" url: amqp:ssl:#{facts[:fqdn]}:5671",
' subscriptions_queue_address: katello_event_queue',
' cdn_proxy:',
' host: http://myproxy.org',
' port: 8888',
' user: admin',
' password: secret_password'
':katello:',
' :rest_client_timeout: 120',
' :post_sync_url: https://localhost/katello/api/v2/repositories/sync_complete?token=test_token',
' :candlepin:',
' :url: https://localhost:8443/candlepin',
' :oauth_key: katello',
' :oauth_secret: secret',
' :pulp:',
" :url: https://#{facts[:fqdn]}/pulp/api/v2/",
' :oauth_key: katello',
' :oauth_secret: secret',
' :qpid:',
" :url: amqp:ssl:#{facts[:fqdn]}:5671",
' :subscriptions_queue_address: katello_event_queue',
' :cdn_proxy:',
' :host: http://myproxy.org',
' :port: 8888',
' :user: admin',
' :password: secret_password'
]
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/katello_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

it 'should set up the cdn_ssl_version' do
should contain_file('/etc/foreman/plugins/katello.yaml').
with_content(/^\s*cdn_ssl_version:\s*TLSv1$/)
with_content(/^\s*:cdn_ssl_version:\s*TLSv1$/)
end
end
end
Expand Down
33 changes: 33 additions & 0 deletions templates/katello.yaml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### File managed with puppet ###
## Module: puppet-katello

:katello:
<%- if @cdn_ssl_version && !@cdn_ssl_version.strip.empty?-%>
:cdn_ssl_version: <%= @cdn_ssl_version %>
<%- end -%>

:rest_client_timeout: 120

:post_sync_url: https://localhost<%= @deployment_url %>/api/v2/repositories/sync_complete?token=<%= @post_sync_token %>

:candlepin:
:url: <%= @candlepin_url %>
:oauth_key: <%= @oauth_key %>
:oauth_secret: <%= @oauth_secret %>

:pulp:
:url: <%= @pulp_url %>
:oauth_key: <%= @oauth_key %>
:oauth_secret: <%= @oauth_secret %>

:qpid:
:url: <%= @qpid_url %>
:subscriptions_queue_address: <%= @candlepin_event_queue %>

<%- if @proxy_url -%>
:cdn_proxy:
:host: <%= @proxy_url %>
:port: <%= @proxy_port %>
:user: <%= @proxy_username %>
:password: <%= @proxy_password %>
<%- end -%>
43 changes: 0 additions & 43 deletions templates/katello.yml.erb

This file was deleted.