Hi there!

ansible-playbook (v. 2.2.0.0) throws an error message that I do not
understand in my conext: "'pkg_repo_list' is undefined"

The task reads:
----------------------------------------
    - name: ensure defined apt keys
      apt_key:
        state: present
        id: "{{pkg_item.id}}"
        keyserver: "{{pkg_item.server}}"
      with_items: "{{pkg_repo_list.repo_keys}}"
      loop_control:
        loop_var: pkg_item
      become: True
      when: (pkg_repo_list is defined) and (pkg_repo_list.repo_keys is
defined)
----------------------------------------

The task is the first of two tasks enclosed in a block:
  - block:
    [...]
    when: pkg_repo_list is defined

(Because of this conditioned block the "when" in the tasks first read
"when: pkg_repo_list.repo_keys is defined", which resulted in the same
error message.)

Shouldn't this task be skipped (in fact: the complete block) and thus
result in no error? What is it that I do not seen here?

Cheers, Kai

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1f57a2ef-49ac-dfc3-6670-a7f8e6989939%40gmx.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to