blob: e2368e9f45d00afb7ac23da6e15a8cce87add69a [file] [log] [blame]
Zack Williams8625d042016-02-26 14:32:43 -07001---
2# file: roles/common-prep/tasks/main.yml
3
Zack Williams6f5a6e72016-08-10 17:45:27 -07004- name: Upgrade system to current using apt
5 when: run_dist_upgrade
6 apt:
7 upgrade: dist
8 update_cache: yes
9 cache_valid_time: 3600
10
11- name: Determine if a reboot if required
12 when: run_dist_upgrade
13 stat: path=/var/run/reboot-required
Zack Williams709f11b2016-03-17 14:29:51 -070014 register: reboot-required
15
Zack Williams6f5a6e72016-08-10 17:45:27 -070016- name: Perform a reboot if required
17 when: run_dist_upgrade and reboot-required.exists is defined
Zack Williams709f11b2016-03-17 14:29:51 -070018 debug: msg="System will reboot"
Zack Williamsa9421e22016-03-02 13:53:37 -070019 notify:
Zack Williams6c3b8732016-03-15 09:57:07 -070020 - restart host
21 - wait for host
Zack Williams8625d042016-02-26 14:32:43 -070022
23- name: Install standard packages
Zack Williams7ec058b2016-05-02 10:10:39 -070024 apt:
25 pkg={{ item }}
26 state=present
27 update_cache=yes
28 cache_valid_time=3600
Zack Williams8625d042016-02-26 14:32:43 -070029 with_items:
30 - tmux
31 - vim
32
Zack Williams1d8a6822016-06-08 08:33:43 -070033- name: Remove annoying default editors
34 apt:
Zack Williams6f5a6e72016-08-10 17:45:27 -070035 pkg: "{{ item }}"
36 state: absent
37 update_cache: yes
38 cache_valid_time: 3600
Zack Williams1d8a6822016-06-08 08:33:43 -070039 with_items:
40 - nano
41 - jove
42
Zack Williams8625d042016-02-26 14:32:43 -070043- name: Enable vim syntax highlighting
44 lineinfile: dest=/etc/vim/vimrc
45 regexp="^\s*syntax on"
46 line="syntax on"
Zack Williamsa9421e22016-03-02 13:53:37 -070047
Zack Williamsf5d8caf2016-06-03 13:11:09 -070048- name: Configure tmux
49 copy:
50 src=tmux.conf
51 dest="{{ ansible_user_dir }}/.tmux.conf"
Zack Williams6f5a6e72016-08-10 17:45:27 -070052