how to comment multiple lines in ansible playbook

20,745 views
Skip to first unread message

jithendra myla

unread,
Jan 19, 2017, 6:03:30 PM1/19/17
to Ansible Project
how to comment multiple lines in ansible playbook

for line i just use #
but to comment multiple line ?


Thank you 
-Jay

Brian Coca

unread,
Jan 19, 2017, 6:17:49 PM1/19/17
to ansible...@googlegroups.com
multiple # .. playbooks are YAML, which does not have a multiline comment.


----------
Brian Coca

Shyam Yenna

unread,
Jan 20, 2017, 1:10:13 PM1/20/17
to Ansible Project

if your using linux machine. Use vi editor identify multi lines to comment and comment them

: set number
:10,20s/^/#/

jithendra myla

unread,
Jan 23, 2017, 2:38:26 PM1/23/17
to Ansible Project

Thank you Brian Coca

jithendra myla

unread,
Jan 24, 2017, 10:40:37 AM1/24/17
to Ansible Project
Thank you Shyam, it works now

Abhishek Abhishek

unread,
Mar 28, 2020, 3:45:54 AM3/28/20
to Ansible Project
Hi,

Is this because python doesn't support multi line comment?

Regards,
Abhishek

Dick Visser

unread,
Mar 28, 2020, 10:15:39 AM3/28/20
to ansible...@googlegroups.com
No that is entirely unrelated. 

--
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/d6fbed68-48ab-4161-a37c-2acb8e974274%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.
Reply all
Reply to author
Forward
0 new messages