On Mon, 30 Mar 2020 20:55:10 -0700 (PDT) Sandy Hung <[email protected]> wrote:
> fatal: [localhost]: FAILED! => {
> "msg": "The task includes an option with an undefined variable. The
> error was: 'dict object' has no attribute 'ansible_facts'
> [...]
> - local_action:
> module: efs_info
> name: "{{ efs_vol_name }}"
> run_once: true
> register: _efs_fact
>
> - set_fact:
> _efs_fact_id: "{{ efs_fact.ansible_facts.efs[0].file_system_id }}"
There are 2 problems.
1) "efs_info" says: "Note that the efs_info module no longer returns
ansible_facts!"
https://docs.ansible.com/ansible/latest/modules/efs_info_module.html#synopsis
2) The underscore "_" is missing in front of the variable "_efs_fact". Correct
- set_fact:
_efs_fact_id: "{{ _efs_fact. ... }}"
But, first you might want to take a look at the content of the registered
variable and see what is available
- debug:
var: _efs_fact
HTH,
-vlado
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20200331083357.19cd76a2%40gmail.com.
pgpdLgfPmk8T4.pgp
Description: OpenPGP digital signature
