Thank You Uwe Sauter.
Yes, it was due to spaces. Thanks again for quick assistance.
Regards,
Abdul
On Sunday, November 13, 2016 at 10:08:42 PM UTC+5:30, Uwe Sauter wrote:
>
> Try the attached Python script.
>
> But probably you just have the wrong number of spaces for indentation.
>
> Try:
>
> ---
> - hosts: node02
> vars:
> ORACLE_BASE: /u01/oracle/product
> ORACLE_HOME: /u01/oracle/product/11.2.0
> remote_user: oracle
> sudo_user: root
> sudo: false
> gather_facts: true
> tasks:
> - name: export ORACLE_HOME
> action: shell export ORACLE_HOME={{ ORACLE_HOME }};
>
>
> But also be advised that you can specify the environment directly in your
> playbook. First question in the FAQ
> (http://docs.ansible.com/ansible/faq.html)
>
>
>
> Am 13.11.2016 um 17:28 schrieb Shaikh Abdul:
> > Hi Experts,
> >
> > My export.yml is failing,please correct me
> >
> >
> > [oracle@node02 ~]$ cat export.yml
> > ---
> > - hosts: node02
> > vars:
> > ORACLE_BASE: /u01/oracle/product
> > ORACLE_HOME: /u01/oracle/product/11.2.0
> > remote_user: oracle
> > sudo_user: root
> > sudo: false
> > gather_facts: true
> > tasks:
> > - name: export ORACLE_HOME
> > action: shell export ORACLE_HOME={{ ORACLE_HOME }};
> >
> >
> ********************************************************************************
>
>
> > [oracle@node02 ~]$ ansible-playbook -i hosts -k export.yml
> > SSH password:
> > ERROR! Syntax Error while loading YAML.
> >
> >
> > The error appears to have been in '/home/oracle/export.yml': line 3,
> column 3, but may
> > be elsewhere in the file depending on the exact syntax problem.
> >
> > The offending line appears to be:
> >
> > - hosts: node02
> > vars:
> > ^ here
> >
> > Regards,
> > Abdul
> >
> > --
> > 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] <javascript:> <mailto:
> [email protected] <javascript:>>.
> > To post to this group, send email to [email protected]
> <javascript:> <mailto:[email protected] <javascript:>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ansible-project/5e2d2fb4-203b-45a6-9bc6-ef095588abc4%40googlegroups.com
>
> > <
> https://groups.google.com/d/msgid/ansible-project/5e2d2fb4-203b-45a6-9bc6-ef095588abc4%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
--
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/f58466ee-20ed-4bf4-b1d0-9ed7ae45d21c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.