blob: 409a1790c775cdb4be72e8be9f7df8ae4295f9fd [file] [log] [blame]
Zack Williams8625d042016-02-26 14:32:43 -07001---
2# file: roles/common-prep/tasks/main.yml
3
4- name: Upgrade system to current using apt
Zack Williams709f11b2016-03-17 14:29:51 -07005 apt:
Zack Williams6c3b8732016-03-15 09:57:07 -07006 upgrade=dist
Zack Williams709f11b2016-03-17 14:29:51 -07007 update_cache=yes
Zack Williams6c3b8732016-03-15 09:57:07 -07008 cache_valid_time=3600
Zack Williams709f11b2016-03-17 14:29:51 -07009
10- stat:
11 path=/var/run/reboot-required
12 register: reboot-required
13
14- name: reboot if required
15 when: reboot-required.exists is defined
16 debug: msg="System will reboot"
Zack Williamsa9421e22016-03-02 13:53:37 -070017 notify:
Zack Williams6c3b8732016-03-15 09:57:07 -070018 - restart host
19 - wait for host
Zack Williams8625d042016-02-26 14:32:43 -070020
21- name: Install standard packages
Zack Williams7ec058b2016-05-02 10:10:39 -070022 apt:
23 pkg={{ item }}
24 state=present
25 update_cache=yes
26 cache_valid_time=3600
Zack Williams8625d042016-02-26 14:32:43 -070027 with_items:
28 - tmux
29 - vim
30
31- name: Enable vim syntax highlighting
32 lineinfile: dest=/etc/vim/vimrc
33 regexp="^\s*syntax on"
34 line="syntax on"
Zack Williamsa9421e22016-03-02 13:53:37 -070035