Closed snkellner closed 7 months ago
@snkellner Are you not able to create a audit file with the current module (https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_vserver_audit_module.html#ansible-collections-netapp-ontap-na-ontap-vserver-audit-module)
If not can you show me the command you use to create it.
Hi, sure, it is possible to create an audit file. The options for the schedule are missing in the ansible module. In the cli and the rest api they exist. The customer is using this cli command. Sorry, I thought I added it above.
vserver audit create -vserver
@snkellner Sorry for the delay
I believe you should be able to set this with the
duration option https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_vserver_audit_module.html#parameter-log/retention/duration
So it should be something like
Hi Chris, also sorry for the delay, was out of office last week. Yes, the duration can be set like you state above. What is still missing is the schedule. The customer wants to rotate the file when it gets bigger than 200mb on mondays at midnight. So it would be good to have the parameters for rotate-schedule-* in the ansible module as well. Not sure what already can be specified with the rotation: parameter in the module.
I have DEVOPS-6691 to add this.
this is released in 22.11.0, will be closing this issue.
Summary
We always try to create a new audit log file on Mondays at midnight and then keep it for a maximum of 367 days. With the cli this is possible and the result looks like this: fs8506::> vserver audit show -vserver svm85064f8fb565b9
Log Rotation Schedule: Day of Week: Monday Log Rotation Schedule: Day: - Log Rotation Schedule: Hour: 0 Log Rotation Schedule: Minute: 0 Rotation Schedules: Mon@0:00 Log Files Rotation Limit: 0 Log Retention Duration: 367d 0h 0m 0s Strict Guarantee of Auditing: true
Component Name
na_ontap_vserver_audit_module
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
Same as in the cli command, see summary. Setting duration for rotation should be supported. The REST ApI is already capable of doing it. We are missing this functionality in the ansible module.
Actual Results