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 @CChanjun:

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

300 active golfers, 940 entries

Solutions by @CChanjun:
9
#172 - Chun Chanjun / @CChanjun

11/19/2021 at 03:48PM

9
#>200 - Chun Chanjun / @CChanjun

04/04/2024 at 09:59AM

10
#>235 - Chun Chanjun / @CChanjun

11/19/2021 at 03:46PM

10
#>245 - Chun Chanjun / @CChanjun

03/27/2023 at 11:21AM

11
#>273 - Chun Chanjun / @CChanjun

11/19/2021 at 03:45PM

12
#>287 - Chun Chanjun / @CChanjun

11/19/2021 at 03:44PM