ok, so that's possible w/ the 'sync to master' functionality of the audit job. what's the question ?
My question is will it copy whole to the other servers just like the SCP
MY question is the file in the Master keep Changing frequently or More offen , when ever there is a change in the file on Master Server I want to Audit and copy to other servers immidiatly
As long as ‘file contents’ are checked as attributes on the file objects in the audit job definition, the file contents will be copied.
so you probably need to drive this from the blcli - you would need to run the audit job, check the result to see if it was inconsistent, then kick off the command to generate the remediation package and then create and run the deploy. it will only detect changes when the audit job runs, it won't be triggered by the files themselves changing.
Do you have any ideas on which commands are needed? I'm guessing it will be a bunch of unpublished commands and I'm having hard time finding them.
I can execute an audit job from blcli, but as far as getting the result and executing synchronization, I'm having a hard time.
you need the targetComponent and the audit job result key. you can get the result key from JobResult.findJobResultKey
from the job run i think can use the 'isconsistent' to see if the job had a variance and then i think you can export the results w/ one of the utiilty commands, then scrape that for the list of servers/components that are changed. you should know the template, so w/ the template and server id you should be able to get the componentkeys of the inconsistent targets and just loop through.
Exactly what I was looking for!
Only thing I would add is that 'isconsistent' seems to be in the AuditTarget name space, not jobrun, at least for 8.6
Thanks , When I created the BLPackage first time , Its working fine, when I tried to Update/Create the next time its giving error
" the name 'x9870fmt' already exists in this folder.Cannot store a failed command result"
Now I am in a confusion whether to use the Delete "deleteBlPackageByGroupAndName" before the create command or check if the BLPackage exist than can I Update BLPackage with "UpdateByName"
Uma, I think you can use replacePackageItemFileContent from BlPackageItem to replace the file that's in the BLPakcage
why do you want to update the same package ?
new content = new blpackage and job.?
I want to update the BlPackage ,
as i mentioned in another post today, blcli commands to manipulate the contents of existing blpackages are pretty lacking
it's pretty cheap/easy to make a new package and new job for each sync you need to perform. additionally that lets you know what got sync'd in a particular job.