Skip to content

Commit

Permalink
Release 1.0.8 (#14)
Browse files Browse the repository at this point in the history
* Add accept license

* Add permissions for private-chef-secrets.json

* Add permissions for private-chef-secrets.json

* Give correct permissions to crt file

* Bump version

* Normalize code
  • Loading branch information
manegron authored Sep 17, 2024
1 parent 6430d28 commit c647caa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
cookbook-chef-server CHANGELOG
===============

## 1.0.8

- Miguel Negron
- [efe65ea] Give correct permissions to crt file
- [5bd1cef] Add permissions for private-chef-secrets.json
- [04a83e9] Add permissions for private-chef-secrets.json
- [d52719b] Add accept license

## 1.0.7


Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email '[email protected]'
license 'AGPL-3.0'
description 'Installs/Configures chef-server'
version '1.0.7'
version '1.0.8'
20 changes: 19 additions & 1 deletion resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@

# chef-server reconfigure
execute 'Configuring chef-server' do
command '/usr/bin/chef-server-ctl reconfigure &>> /root/.install-chef-server.log'
command '/usr/bin/chef-server-ctl reconfigure --chef-license=accept &>> /root/.install-chef-server.log'
end

file '/etc/opscode/private-chef-secrets.json' do
owner 'opscode'
group 'opscode'
mode '0600'
action :touch
only_if { ::File.exist?('/etc/opscode/private-chef-secrets.json') }
# notifies :restart, 'service[opscode-erchef]', :immediately # TODO: Check if this was needed or not
end

# stop chef-server services
Expand Down Expand Up @@ -164,6 +173,15 @@
node.default['chef-server']['datastore_configured'] = true
end

# Change default permissions of crt file needed by webui (644)
file "/root/.chef/trusted_certs/#{node['hostname']}.crt" do
owner 'root'
group 'root'
mode '0644'
action :touch
only_if { ::File.exist?("/root/.chef/trusted_certs/#{node['hostname']}.crt") }
end

# TODO: Chef services configuration (erchef, etc...)
if postgresql
# call to postgresql resource
Expand Down

0 comments on commit c647caa

Please sign in to comment.