Forum Discussion
Modify multiple ASM policy via cli/API
Fortunately it's not too difficult, after you sift through the mountain of dead end dox.
You can change this up as you'd like but here we go! First I recommend coming up with a friendly naming scheme. Make sure all your XML policies are the same name as your actual policy but add _new to each one i.e. your policy is called MY_POLICY on the ASM so your XML file with your new edits should be called MY_POLICY_new.xml Do this for all policies and then your script life will be a breeze here after.
So with this in mind, here's how I do it:
mkdir /shared/tmp/asm_push
SCP upload your XML policies to /shared/tmp/asm_push
write script to iterate through policy names and create variables
run this command to replace the variables. You're smart enough to figure out what they relate to :)
load /Common/$POLICYVAR overwrite file /shared/tmp/asm_push/$POLICYVAR_new.xml
Enjoy the extra years you'll gain in your wrists usage! I have over 200 ASM policies abroad that consist of 30 VERY custom policies I developed that we've had to manually load for years... UNTIL NOW!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com