-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to disable an existing security rule - rule application and destination being changed incorrectly #467
Comments
🎉 Thanks for opening your first issue here! Welcome to the community! |
Firstly, I get different behaviors when using state merged vs present. Things look "better" when state is set to merged. I then changed my playbook to use include_tasks so I can run multiple plays within my loop, e.g:
And then in disable_rule.yml, I gather the facts about the rule as the first play and then try to disable the rule in the second play:
But even then, I'm getting unexpected results from this when I look at the change preview and having to send things like source_ip, destination_ip etc seems unreasonable when the only thing that should be changed is "disabled = yes". So I'm now using panos_type_cmd which from my initial testing "just works":
I just need to write a play that uses panos_op to add an audit comment and this quest should be completed. I'm still unsure if this is a bug or not. If this is expected behavior and I'm just "holding it wrong", please go ahead and close this issue. |
Describe the bug
When trying to update an existing security rule, to set it to disabled and add a mandatory audit comment, the following error is returned from Panorama:
Failed update application: application is invalid. 'any' should not be used with another application
After the above error is returned, Panorama does show a change summary, which is not as expected.
Expected behavior
The security rule is disabled without any errors or other modifications.
Current behavior
Possible solution
Unknown.
Steps to reproduce
Snippet from playbook:
The
rules
variable is set usingcommunity.general.read_csv
. The CSV file contains a list of security rule names, device groups etc.Screenshots
Context
A CSV has been produced from another auditing tool with a list of (several hundred) rules to be disabled. I have another playbook that reads a CSV and then deletes rules which works as expected. Full disclosure: I am new to Ansible and the problem could well be me.
Your Environment
The text was updated successfully, but these errors were encountered: