Skip to content

Commit

Permalink
Handle websockets_encrypt as a boolean
Browse files Browse the repository at this point in the history
Since Foreman 97c34475c9e674db6443b28e03a5e4d94d585f2e (1.10+) this is
actually a boolean. The string 'off' would be interpreted as the value
true.
  • Loading branch information
ekohl committed Dec 29, 2018
1 parent 8b525a7 commit 9dbf400
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/classes/foreman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
.with_content(/^:oauth_map_users:\s*false$/)
.with_content(/^:oauth_consumer_key:\s*\w+$/)
.with_content(/^:oauth_consumer_secret:\s*\w+$/)
.with_content(/^:websockets_encrypt:\s*on$/)
.with_content(/^:websockets_encrypt:\s*true$/)
.with_content(%r{^:ssl_certificate:\s*/var/lib/puppet/ssl/certs/foo\.example\.com\.pem$})
.with_content(%r{^:ssl_ca_file:\s*/var/lib/puppet/ssl/certs/ca.pem$})
.with_content(%r{^:ssl_priv_key:\s*/var/lib/puppet/ssl/private_keys/foo\.example\.com\.pem$})
Expand Down
2 changes: 1 addition & 1 deletion templates/settings.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:oauth_consumer_secret: <%= scope.lookupvar("foreman::oauth_consumer_secret") %>

# Websockets
:websockets_encrypt: <%= scope.lookupvar("foreman::websockets_encrypt") ? 'on' : 'off' %>
:websockets_encrypt: <%= scope.lookupvar("foreman::websockets_encrypt") %>
:websockets_ssl_key: <%= scope.lookupvar("foreman::websockets_ssl_key") %>
:websockets_ssl_cert: <%= scope.lookupvar("foreman::websockets_ssl_cert") %>

Expand Down

0 comments on commit 9dbf400

Please sign in to comment.