On 8/26/19 2:34 PM, Chrono 7 wrote:
> I get an error stating:
> 
> |
> ERROR!noaction detected intask.Thisoften indicates a misspelled 
> modulename,orincorrect modulepath.
> 
> Theerror appears to have been in'system_info.yaml':line 7,column 7,but may
> be elsewhere inthe file depending on the exact syntax problem.
> 
> Theoffending line appears to be:
> 
>   tasks:
>     -name:Readthe CSV &SetValues
>       ^here
> |
> 
> That's with my file being reworked to:
> 
> |
> ---
> 
> -name:ImportCSV ContainingInfoForSystem(s)ToPrep
>   hosts:127.0.0.1
> 
>   tasks:
>    -name:Readthe CSV &SetValues
>      read_csv:
>      path:systems.csv
>      register:systems
>      delegate_to:localhost
> 
>    -set_fact:
>        IP:"{{ systems.list.1.IPAddress }}"
> |
> 
> I'm just trying to store values from a CSV file to a variable, I haven't had 
> any luck so far unfortunately.
> 
> 

>From the docs:

# Read a CSV file and access the first item
- name: Read users from CSV file and return a list
  read_csv:
    path: users.csv
  register: users
  delegate_to: localhost

You need to intend the parameters for the Ansible module (path in your case).

Regards
         Racke



-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/a5791a5b-94a6-5374-50b9-b04d9e3489f9%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to