#na_ontap_restit returns nothing when run with a --check

1 messages · Page 1 of 1 (latest)

wintry shore
#

If I use the na_ontap_restit module to query something (i.e. to pull a list of snapmirror destinations as discussed in https://discord.com/channels/855068651522490400/1291461473624920104) it works fine. But, if I run the playbook with a "--check", it just says what it would have run if I wasn't doing a check, so the variables that get defined and are used later in the playbook are never defined, and everything fails.

Since this particular use of na_ontap_restit is just doing a GET, is there any fancy way to code around this and tell it, "I know I ran this as just a check, but for this particular task, I want you to run for real" so that the variables get defined and the later tasks can be checked?

tough prairie
#

@wintry shore You can try using either check_mode: no or when: not ansible_check_mode, this allows only a specific read only task to run.