vi editor for Ansible playbook

124 views
Skip to first unread message

Aharonu

unread,
Oct 1, 2022, 10:17:06 AM10/1/22
to ansible...@googlegroups.com
Hi All,

Could anyone please direct me what options i need to use/enable  for while writing playbooks in vi editor colour indication lines as mentioned attached  example.

Thank you in advance.


download.jpeg

Andrew Latham

unread,
Oct 1, 2022, 10:52:48 AM10/1/22
to ansible...@googlegroups.com

--
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/CANGEjuW1whch3WYr7AVT_jstQ3pqrT2t-967xndht0FyFH6Xag%40mail.gmail.com.


--
- Andrew "lathama" Latham -

Rowe, Walter P. (Fed)

unread,
Oct 3, 2022, 7:12:48 AM10/3/22
to ansible...@googlegroups.com
Attached is my vimrc file. Place it in ~/.vimrc. This also maps F7 to toggle syntax highlighting. VIM has syntax aware code. You just need to enable it.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

--
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/CANGEjuW1whch3WYr7AVT_jstQ3pqrT2t-967xndht0FyFH6Xag%40mail.gmail.com.
<download.jpeg>
vimrc

Aharonu

unread,
Oct 3, 2022, 7:33:01 AM10/3/22
to ansible...@googlegroups.com
Thank you for your assistance. I have just applied what you suggested but I still see there is no coloring format for my anisble playbooks.  Please see attached file and request to suggest if something I'm missing.

Thank you again for your time.

20221003_165819.jpg

Aharonu

unread,
Oct 3, 2022, 7:38:19 AM10/3/22
to ansible...@googlegroups.com
I see it for vimrc 

<F7>          :if exists("syntax_on") | syntax off | else | syntax on | endif <CR>

Will McDonald

unread,
Oct 3, 2022, 8:36:02 AM10/3/22
to ansible...@googlegroups.com
What distro/environment are you using? Typically with Red Hat-based distros you need the vim-enhanced package installed for colour syntax highlighting.

Aharonu

unread,
Oct 3, 2022, 8:39:14 AM10/3/22
to ansible...@googlegroups.com

Rowe, Walter P. (Fed)

unread,
Oct 3, 2022, 8:51:21 AM10/3/22
to ansible...@googlegroups.com
It is in Linux server

Ubuntu? Red Hat? CentOS? What version? Linux Server is not specific.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

Will McDonald

unread,
Oct 3, 2022, 8:53:25 AM10/3/22
to ansible...@googlegroups.com
There are a number of different variants or flavours of Linux. (https://en.wikipedia.org/wiki/List_of_Linux_distributions)

If the variant you're using is based on Red Hat (e.g. Fedora, CentOS or similar) then you may need the additional vim-enhanced RPM installed. (Check with a local administrator if you're unsure.)

Check the contents of /etc/os-release, that should give some indication of OS flavour (type) for most common distros.



Aharonu

unread,
Oct 3, 2022, 8:54:43 AM10/3/22
to ansible...@googlegroups.com
Sorry.

It is red hat entrprise Linux 7.9

Aharonu

unread,
Oct 3, 2022, 9:01:00 AM10/3/22
to ansible...@googlegroups.com
It helps I will check it out for rpm install.
 
Thank you for quick help and providing details.

Reply all
Reply to author
Forward
0 new messages