Hi,
I was trying to get one 'command' promise to only run after a 'file' promise
has been run, so I tried to use the promiser/promisee relationship to create
the dependency:
bundle agent update_build_scripts
{
commands:
batch_server.install_oracle_instant_client::
"${services_path}/installOracleClient.sh"
comment => "install oracle client",
depends_on => "update_services",
handle => "run_oracle_install_script";
files:
# Triggered on the batch server
batch_server.install_oracle_instant_client::
"${services_path}/." -> { "run_oracle_install_script" }
comment => "Update the services files",
handle => "update_services",
create => "true",
copy_from =>
remote_no_purge("${global.cfbase_server}", "${services_server_path}"),
depth_search => recurse("inf");
}
The descriptions in these two sections, seems to indicate that is the purpose
of the 'promisee' as I have above:
http://www.cfengine.org/manuals/cf3-3.0.4.html#Rules-are-promises
http://www.cfengine.org/manuals/cf3-3.0.4.html#Best-practice-for-writing-promises
but that doesn't seem to be working that way as the command promise runs
everytime, but only succeeds when the 'installOracleClient.sh' script is
installed by the file promise (so essential that is ok, but seems to contradict
the purpose of promiser/promisee relationship). I was expecting the file
promise to run on the first iteration of the agent invocation and then the
command promise to not run until the file promise has run at least once by
having the 'depends_on' parameter.
Could anyone explain the promiser/promisee relationship better to me or tell me
what I'm doing wrong?
Also, this construct causes this error:
"Validation: rhs is a scalar, but lhs (slist) is not a scalar type"
Thank you,
Eric
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine