#na_ontap_command with variables
1 messages · Page 1 of 1 (latest)
just a little more info on this, I am using the playbook to rename some aggregates and want to use 3 variables in the loop, item.hostname, item.oldname, item.newname. I am using the command module instead of the aggregate module as i am paranoid about releasing this to ops and someone putting absent or offline into the module and wrecking a prod machine. hence using the scruffier way of running each command to be safe.
oh boy I hope you're doing proper input sanitization in that case, otherwise a crafty user who puts something like foo; priv set -c off; node halt * into your aggregate name can wreak even more havoc 😉
Also, ONTAP doesn't let you offline an aggregate that still has volumes on it, not even through the API
Ansible has a lot of information on loop here. https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html With how to pass variable as well.