Only run mon-setup on installation and upgrade
This commit is contained in:
parent
6f9fa9a721
commit
566fc178cd
|
@ -7,16 +7,15 @@ include_recipe "python"
|
|||
end
|
||||
end
|
||||
|
||||
python_pip 'mon-agent' do
|
||||
action :upgrade
|
||||
end
|
||||
|
||||
# todo what is with the multiple levels and the repetition in the names in the data bag, fix
|
||||
# todo service is a new settings in the databag
|
||||
settings = data_bag_item(node[:mon_agent][:data_bag], 'mon_agent')
|
||||
execute 'mon-setup' do
|
||||
action :run
|
||||
action :nothing
|
||||
command "/usr/local/bin/mon-setup -u #{settings['username']} -p #{settings['password']} -s #{settings['service']} --keystone_url #{settings['keystone_url']} --project_name #{settings['project_name']} --mon_url #{settings['mon_api_url']}"
|
||||
end
|
||||
|
||||
python_pip 'mon-agent' do
|
||||
action :upgrade
|
||||
notifies :run, "execute[mon-setup]"
|
||||
end
|
||||
|
||||
include_recipe 'mon_agent::plugin_cfg'
|
||||
|
|
Loading…
Reference in New Issue