We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There seems to be a Problem with variables that are defined in the invertory file. Example hosts.yml:
all: hosts: children: production: vars: ansible_python_interpreter: /usr/bin/python3 hosts: host1.com: userlist: - user_name: "user1" host2.com: userlist: - user_name: "user1" - user_name: "user2" - user_name: "user3" host3.com: userlist: - user_name: "user1"
Example paybook that uses theese vars:
--- - hosts: all remote_user: root tasks: - name: Add users ansible.builtin.user: name: "{{ item.user_name }}" shell: /bin/bash groups: wheel append: yes with_items: "{{ userlist }}" - name: Set authorized key {{ item.user_name }} authorized_key: user: "{{ item.user_name }}" state: present key: "{{ lookup('file', '../files/ssh-keys/{{ item.user_name }}.pub') }}" with_items: "{{ userlist }}"
When executed on CLI it works just fine.
When executed in Rundeck this error message appears:
The task includes an option with an undefined variable. The error was: 'user_name' is undefined
The text was updated successfully, but these errors were encountered:
I have the same issue. Perhaps any resolution?
Sorry, something went wrong.
No branches or pull requests
There seems to be a Problem with variables that are defined in the invertory file.
Example hosts.yml:
Example paybook that uses theese vars:
When executed on CLI it works just fine.
When executed in Rundeck this error message appears:
The text was updated successfully, but these errors were encountered: