I have the following task which uses with_nested with variables that could be empty.
- name: Authorize SSH keys for all website users.
user="{{ item.0.user | default(websites_default_user) }}"
key="{{ lookup('file', 'data/public-ssh-keys/' ~ item.1.key) }}"
key_options="{{ item.1.options | default(omit) }}"
state="{{ item.1.state | default('present') }}"
- "{{ ssh_keys_for_all_websites }}"
However, it is now throwing the following warning:
[DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.:
'ssh_keys_for_all_websites' is undefined.
First of all, this warning is incorrect. The variable "ssh_keys_for_all_websites" is defined, it is defined as "[]", an empty list. Further, I want to continue to be able to use with_nested with variables that could (for some hosts) be empty. If this is deprecated, what is the suggested alternative?