Roles Concept in ansible 2.7 version

60 views
Skip to first unread message

VJ49

unread,
Dec 3, 2018, 7:23:37 AM12/3/18
to Ansible Project

HI, 
      I am familiar with this ansible coding. Right now, ansible updated to 2.7. While running/checking the syntax of a code. I am getting error as a malformed block was encountered while loading a block.
I found that problem is with ansible keyword "roles". In ansible 2.7, roles syntax changed partially. I am posting my code here. Can anyone help me to resolve this issue...


Code:
---
- name:  Deploy project
  hosts: localhost
  roles:
    - san
  vars_files:
    - /var/lib/project-admin/answerfile.yml
    - /var/lib/project/answerfile.yml

The same code is working fine with ansible 2.0.0 version. 
Thank you,

Regards
Vuppala Jagadeesh

Jonathan Lozada De La Matta

unread,
Dec 3, 2018, 7:48:39 AM12/3/18
to ansible...@googlegroups.com
Are you sing ansible lint? the issue might be spacing in your roles.

--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/56788914-209f-42fc-a76f-9441b7a30438%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jonathan lozada de la matta

AUTOMATION PRACTICE



 

VJ49

unread,
Dec 3, 2018, 8:07:44 AM12/3/18
to Ansible Project
@Jonathan Lozada De La Matta ... I am not using Ansible lint..... I specified only one role there that to be in correct manner. 

Jordan Borean

unread,
Dec 3, 2018, 2:32:00 PM12/3/18
to Ansible Project
Can you share the actual output. I’m not aware of any syntax changes to roles. It sounds like the block issue is in the role you are calling and not the playbook.

VJ49

unread,
Dec 3, 2018, 11:53:01 PM12/3/18
to Ansible Project

error2.PNG

Hi, This is the code.. Have a look...

Jonathan Lozada De La Matta

unread,
Dec 4, 2018, 6:41:16 AM12/4/18
to ansible...@googlegroups.com
I would check the role called san and verify that the spacing for the block is correct. Look at the ansible documentation for an example of a block.

--
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 post to this group, send email to ansible...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jordan Borean

unread,
Dec 4, 2018, 2:22:32 PM12/4/18
to Ansible Project
Agreed, we’ve seen your playbook I want to see the output when running Ansible as that will tell us where the syntax issue is.

sateesh s

unread,
Dec 4, 2018, 4:27:05 PM12/4/18
to ansible...@googlegroups.com
Hi,

I am trying to setup communication between ansible and a windows server which is hosted in virtual machine manager.

I set host file and trying to communicate through basic authentication.
I have open the ports 5985
And allowedunecrypted : true

 Do any one know about it.

I am getting error like 
Bad HTTP response from server . Code 404

Thanks in advance

On Tue, Dec 4, 2018 at 2:22 PM Jordan Borean <jbor...@gmail.com> wrote:
Agreed, we’ve seen your playbook I want to see the output when running Ansible as that will tell us where the syntax issue is.

--
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 post to this group, send email to ansible...@googlegroups.com.

Dick Visser

unread,
Dec 5, 2018, 5:28:45 PM12/5/18
to ansible...@googlegroups.com
Hi Sateesh

On Tue, 4 Dec 2018 at 22:27, sateesh s <satees...@gmail.com> wrote:
>
> Hi,
>
> I am trying to setup communication between ansible and a windows server which is hosted in virtual machine manager.
>
> I set host file and trying to communicate through basic authentication.
> I have open the ports 5985
> And allowedunecrypted : true
>
> Do any one know about it.
>
> I am getting error like
> Bad HTTP response from server . Code 404

Can you please tell how your answer is related to the original topic?
In case there is no correlation, please start a new thread, and supply
more context (actual inventory, playbooks, and most important: what
you're tying to achieve).

Thanks

Dick
Reply all
Reply to author
Forward
0 new messages