#Change snap schedule on aggregates using na_ontap_ssh_command module

1 messages · Page 1 of 1 (latest)

cosmic kiln
#

Hi all,

I'm trying to change the snap sched on root and data aggrs using na_ontap_ssh_command module but the module says changed=true during playbook run but on the cluster the setting won't change! In the past, I was using na_ontap_command module to change this config.

Any help would be appreciated. Thank you

Playbook:

  • name: "Run command to set snap schedule on aggregate(s): {{ cluster }}"
    netapp.ontap.na_ontap_ssh_command:
    command: node run -node {{ item.node }} -command snap sched -A {{ item.aggregate }} 0
    <<: *clusterlogin
    with_items: "{{ aggr_options }}"
    when: aggr_options is defined
    tags:
    • aggr_schedule

Playbook output:
changed: [localhost] => (item={'node': 'test-c01-nas-n02', 'aggregate': 'aggr0_n02'}) => changed=true
ansible_loop_var: item
invocation:
module_args:
accept_unknown_host_keys: false
cert_filepath: null
command: node run -node test-c01-nas-n02 -command snap sched -A aggr0_n02 0
exclude_lines: ''
feature_flags: null
force_ontap_version: null
hostname: 10.123.91.25
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_n02
node: test-c01-nas-n02
stderr: ''
stderr_lines: <omitted>
stdout: |2-

Last login time: 2/23/2023 10:21:25
Unsuccessful login attempts since last login: 1

stdout_lines: <omitted>
stdout_lines_filtered: []

test-c01-nas::> node run -node test-c01-nas-n02 -command snap sched -A
Node: test-c01-nas-n02
Aggregate aggr0_n02: 0 1 4@9,14,19

vars:

  • { node: "test-c01-nas-n02", aggregate: "aggr0_n02" }
hoary knoll
#

from na_ontap_ssh_command module doc
Note that the module can succeed even though the command failed. You need to analyze stdout and check the results.

small query - is O in this command is valid
command: node run -node {{ item.node }} -command snap sched -A {{ item.aggregate }} 0

I can run command good in my end

#

o I am getting error, with 0 its good.

cosmic kiln
#

Didn't get what you were saying w/re to running the command on your end. I can manually run the command fine as well but for some reason this module isn't changing the configs for nodeshell commands.

hoary knoll
#

please share playbook run with -vvv flag.

ansible-playbook playbook.yml -vvv

modify hostname in it and share, thanks