On 26.08.2019 03:44, Chrono 7 wrote:
fatal: [127.0.0.1]: FAILED! => {"msg": "The task includes an option
with an
undefined variable. The error was: 'systems' is undefined\n\nThe error
appears to have been in 'system_info.yaml': line 7, column 7, but
may\nbe
elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n tasks:\n - name: Read the CSV &
Set
Values\n ^ here\n"}
Here's what my playbook looks like:
---
- name: Import CSV Containing Info For System(s) To Prep
hosts: 127.0.0.1
tasks:
- name: Read the CSV & Set Values
read_csv:
path: systems.csv
register: systems
delegate_to: localhost
set_fact:
IP: "{{ systems.list.1.IPAddress }}"
Any ideas on this?
You are missing the dash in front of set_fact.
--
Kai Stian Olstad
--
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/48558bf31857bd045c952fdd53a50575%40olstad.com.