Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5f0f5fbe280fbf000c233304

Add quotes to ansible playbook

You created an ansible playbook, but forgot to add quotes. Can you fix it?

Start file
---
- hosts: all
  vars:
    ssh_state: True
  tasks:
    - name: Manage openssh
      package:
        name: openssh
        state: {{ ssh_state }}
End file
---
- hosts: all
  vars:
    ssh_state: True
  tasks:
    - name: Manage openssh
      package:
        name: openssh
        state: "{{ ssh_state }}"

View Diff

9c9
<         state: {{ ssh_state }}
---
>         state: "{{ ssh_state }}"

Solutions by @maxtong1987:

Unlock 4 remaining solutions by signing in and submitting your own entry
Created by: @__dadav__

246 active golfers, 781 entries

Solutions by @maxtong1987:
8
#38 - maxtong / @maxtong1987

03/19/2021 at 09:46AM

9
#>140 - maxtong / @maxtong1987

03/19/2021 at 09:42AM

10
#>192 - maxtong / @maxtong1987

03/19/2021 at 09:36AM

11
#>223 - maxtong / @maxtong1987

03/19/2021 at 09:31AM