Skip to content

Commit

Permalink
do not enable the "Run Puppet" button
Browse files Browse the repository at this point in the history
since the button doesn't work without the extra workaround
described in:
https://bugzilla.redhat.com/show_bug.cgi?id=959599
https://projects.theforeman.org/issues/1830
  • Loading branch information
cwolferh committed May 20, 2013
1 parent 8d4af48 commit db0614a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions bin/foreman-params.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"user": "admin",
"passwd": "changeme"
},
"settings": [{
"name": "puppetrun",
"value": "true"
}],
"proxy": {
"name": "proxy1",
"host": "https://foreman_hostname:8443"
Expand Down
20 changes: 0 additions & 20 deletions bin/foreman-setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,6 @@ def gen_password
puts SecureRandom.hex
end

def update(cmd, data)
response = @client[cmd].put(data)
rescue RestClient::UnprocessableEntity => e
@log.warn("PUT KO: #{data} => #{e.response}")
else
@log.info("PUT OK: #{data}")
end

def update_settings(settings)
settings.each do|s|
results = @client['settings'].get(:params => { :search => s['name'] })
server_setting = JSON.load(results)[0]
puts server_setting
update( 'settings/'+server_setting['setting']['id'].to_s(), :setting => {
:value => s['value'] })
end
end

def usage
puts "Usage: #{File.basename($0)} proxy | globals | hostgroups"
puts " Multiple commands can be used at same time"
Expand Down Expand Up @@ -162,8 +144,6 @@ def init
create_globals(@params['globals'])
when 'hostgroups'
create_hostgroups(@params['hostgroups'])
when 'settings'
update_settings(@params['settings'])
when 'password'
gen_password
else
Expand Down
8 changes: 0 additions & 8 deletions foreman_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ done
scl enable ruby193 "ruby foreman-setup.rb proxy"
scl enable ruby193 "ruby foreman-setup.rb globals"
scl enable ruby193 "ruby foreman-setup.rb hostgroups"
scl enable ruby193 "ruby foreman-setup.rb settings"
popd
# write client-register-to-foreman script
# TODO don't hit yum unless packages are not installed
Expand All @@ -156,13 +155,6 @@ augtool -s set /files/etc/puppet/puppet.conf/agent/server $PUPPETMASTER
# Puppet Plugins
augtool -s set /files/etc/puppet/puppet.conf/main/pluginsync true
# Allow puppetrun from foreman/puppet master to work
augtool -s set /files/etc/puppet/puppet.conf/agent/listen true
if ! grep -q -P '^path \/run' /etc/puppet/auth.conf; then
perl -0777 -p -i -e 's/\n\n((#.*\n)*path \/\s*\n)/\n\npath \/run\nauth any\nmethod save\nallow $PUPPETMASTER\n\n\$1/' /etc/puppet/auth.conf
fi
# for older versions of puppet, also need to "touch /etc/puppet/namespace.auth"
# check in to foreman
puppet agent --test
sleep 1
Expand Down

0 comments on commit db0614a

Please sign in to comment.