mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-06-05 12:11:58 +02:00
The Ansible Way
This commit is contained in:
parent
e87858d460
commit
e304b29758
1 changed files with 35 additions and 0 deletions
35
README.md
35
README.md
|
@ -679,3 +679,38 @@ Credit:@Tomcat-42
|
|||
Credit: @jofftiquez
|
||||
|
||||
***Quit software engineering for good.***
|
||||
|
||||
## The Ansible Way
|
||||
Credit: @lpmi-13
|
||||
|
||||
run vim.yml playbook with the following contents:
|
||||
|
||||
```
|
||||
---
|
||||
- hosts: vimbox
|
||||
|
||||
vars:
|
||||
required_packages:
|
||||
- vim
|
||||
|
||||
tasks:
|
||||
- name: install python 2
|
||||
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
|
||||
|
||||
- name: Update APT package cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Run apt-get upgrade
|
||||
apt: upgrade=safe
|
||||
|
||||
- name: Install required packages
|
||||
apt: state=installed pkg={{ item }}
|
||||
with_items: "{{ required_packages }}"
|
||||
|
||||
- name: Start Vim in the background.
|
||||
shell: "(vim >/dev/null 2>&1 &)"
|
||||
|
||||
- name: Quit Vim.
|
||||
shell: "(pkill vim)"
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue