Skip to content

Commit e304b29

Browse files
committed
The Ansible Way
1 parent e87858d commit e304b29

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,3 +679,38 @@ Credit:@Tomcat-42
679679
Credit: @jofftiquez
680680

681681
***Quit software engineering for good.***
682+
683+
## The Ansible Way
684+
Credit: @lpmi-13
685+
686+
run vim.yml playbook with the following contents:
687+
688+
```
689+
---
690+
- hosts: vimbox
691+
692+
vars:
693+
required_packages:
694+
- vim
695+
696+
tasks:
697+
- name: install python 2
698+
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
699+
700+
- name: Update APT package cache
701+
apt:
702+
update_cache: yes
703+
704+
- name: Run apt-get upgrade
705+
apt: upgrade=safe
706+
707+
- name: Install required packages
708+
apt: state=installed pkg={{ item }}
709+
with_items: "{{ required_packages }}"
710+
711+
- name: Start Vim in the background.
712+
shell: "(vim >/dev/null 2>&1 &)"
713+
714+
- name: Quit Vim.
715+
shell: "(pkill vim)"
716+
```

0 commit comments

Comments
 (0)