blob: 51b0997f02819f0aba8763f99265aa864205f495 [file] [log] [blame]
Zack Williams8625d042016-02-26 14:32:43 -07001---
Zack Williams5223dd92017-02-28 23:38:02 -07002# file: common-prep/tasks/main.yml
Zack Williams8625d042016-02-26 14:32:43 -07003
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
Zack Williams35624562016-08-28 17:12:26 -070011- name: Reboot if required after dist_upgrade
Zack Williams6f5a6e72016-08-10 17:45:27 -070012 when: run_dist_upgrade
Zack Williams35624562016-08-28 17:12:26 -070013 stat:
14 path: /var/run/reboot-required
15 register: reboot_required
16 changed_when: reboot_required.stat.exists
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:
Zack Williams5223dd92017-02-28 23:38:02 -070023 pkg: "{{ item }}"
24 update_cache: yes
25 cache_valid_time: 3600
Zack Williams8625d042016-02-26 14:32:43 -070026 with_items:
27 - tmux
28 - vim
29
Zack Williams1d8a6822016-06-08 08:33:43 -070030- name: Remove annoying default editors
31 apt:
Zack Williams6f5a6e72016-08-10 17:45:27 -070032 pkg: "{{ item }}"
33 state: absent
34 update_cache: yes
35 cache_valid_time: 3600
Zack Williams1d8a6822016-06-08 08:33:43 -070036 with_items:
37 - nano
38 - jove
39
Zack Williams8625d042016-02-26 14:32:43 -070040- name: Enable vim syntax highlighting
Zack Williams5223dd92017-02-28 23:38:02 -070041 lineinfile:
42 dest: '/etc/vim/vimrc'
43 regexp: '^\s*syntax on'
44 line: 'syntax on'
Zack Williamsa9421e22016-03-02 13:53:37 -070045
Zack Williamsf5d8caf2016-06-03 13:11:09 -070046- name: Configure tmux
47 copy:
Zack Williams5223dd92017-02-28 23:38:02 -070048 src: tmux.conf
49 dest: "{{ ansible_user_dir }}/.tmux.conf"
Zack Williams6f5a6e72016-08-10 17:45:27 -070050