Ok, I used na_ontap_ssh module the play seems to completed fine but the change on node didn't happen. Sharing playbook and output of the playbook run. I'm not sure what's missing in the playbook. Any help will be appreciated.
- name: Run command to set nosnap on aggr
na_ontap_ssh_command:
command: 'node run -node {{ item.node }} -command aggr options {{ item.aggregate }} nosnap off'
<<: *login
with_items: "{{ aggr_options }}"
register: result
when: aggr_options is defined
tags:
- nosnap
changed: [localhost] => (item={'node': 'test-nas-n09', 'aggregate': 'aggr0_n09'}) => changed=true
ansible_loop_var: item
invocation:
module_args:
accept_unknown_host_keys: false
cert_filepath: null
command: node run -node test-nas-n09 -command aggr options aggr0_n09 nosnap off
exclude_lines: ''
feature_flags: null
force_ontap_version: null
hostname: test-nas
http_port: null
https: true
include_lines: ''
key_filepath: null
ontapi: null
password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
privilege: null
service_processor: false
use_rest: auto
username: admin
validate_certs: false
item:
aggregate: aggr0_n09
node: test-nas-n09
stderr: ''
stderr_lines: <omitted>
stdout: |2-
Last login time: 1/17/2023 09:15:59
Unsuccessful login attempts since last login: 1
stdout_lines: <omitted>
stdout_lines_filtered: []