Hello

I just started to use ansible so please bear with me. I managed to run a 
few basic playbooks but I am stuck with the following one (basic as well):

---
- hosts: all
  tasks:
  - name: copy bashrc to .bashrc
    action: copy src=files/bashrc dest=~root/.bashrc backup=yes
  - name: copy bashrc to .bash_profile
    action: copy src=files/bashrc dest=~root/.bash_profile backup=yes
  - name: ensure joe is installed apt
    apt: pkg=joe state=latest update_cache=yes
    when: ansible_os_family == "Debian"
  - name: ensure joe is installed yum
    apt: name=joe state=latest
    when: ansible_os_family == "CentOS" or ansible_os_family == "Fedora"



I get the following error when running it:

ERROR: Syntax Error while loading YAML script, commonconfig.yml
Note: The error may actually appear before this position: line 7, column 1


  - name: copy bashrc to .bash_profile
        action: copy src=files/bashrc dest=~root/.bash_profile backup=yes


The script runs fine when there is only one name/action pair (the first 
one).

Sorry if this is obvious but I am just starting with YAML.

-- 
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/4e2abd33-13a7-4489-97eb-8ac4f8e6310f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to