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"}
---
- 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 }}"
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in 'system_info.yaml': line 7, column 7,
but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Read the CSV & Set Values
^ here
---
- 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 }}"
I get an error stating:
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in 'system_info.yaml': line 7, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Read the CSV & Set Values
^ hereThat's with my file being reworked to:
---
- 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 }}"
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bc158058-cd37-45f2-86df-a0aff57d356b%40googlegroups.com.
- debug:
var: system
- debug:
var: system.csv
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in 'system_info.yaml': line 7, column 7,
but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Read the CSV & Set Values
^ here
---
- 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 }}"
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fd62e720-abea-4810-b281-4fa687e2dd6c%40googlegroups.com.