Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 1 | --- |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame^] | 2 | # file: common-prep/tasks/main.yml |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 3 | |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 4 | - 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 Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 11 | - name: Reboot if required after dist_upgrade |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 12 | when: run_dist_upgrade |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 13 | stat: |
14 | path: /var/run/reboot-required | ||||
15 | register: reboot_required | ||||
16 | changed_when: reboot_required.stat.exists | ||||
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 17 | notify: |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 18 | - restart host |
19 | - wait for host | ||||
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 20 | |
21 | - name: Install standard packages | ||||
Zack Williams | 7ec058b | 2016-05-02 10:10:39 -0700 | [diff] [blame] | 22 | apt: |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame^] | 23 | pkg: "{{ item }}" |
24 | update_cache: yes | ||||
25 | cache_valid_time: 3600 | ||||
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 26 | with_items: |
27 | - tmux | ||||
28 | - vim | ||||
29 | |||||
Zack Williams | 1d8a682 | 2016-06-08 08:33:43 -0700 | [diff] [blame] | 30 | - name: Remove annoying default editors |
31 | apt: | ||||
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 32 | pkg: "{{ item }}" |
33 | state: absent | ||||
34 | update_cache: yes | ||||
35 | cache_valid_time: 3600 | ||||
Zack Williams | 1d8a682 | 2016-06-08 08:33:43 -0700 | [diff] [blame] | 36 | with_items: |
37 | - nano | ||||
38 | - jove | ||||
39 | |||||
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 40 | - name: Enable vim syntax highlighting |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame^] | 41 | lineinfile: |
42 | dest: '/etc/vim/vimrc' | ||||
43 | regexp: '^\s*syntax on' | ||||
44 | line: 'syntax on' | ||||
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 45 | |
Zack Williams | f5d8caf | 2016-06-03 13:11:09 -0700 | [diff] [blame] | 46 | - name: Configure tmux |
47 | copy: | ||||
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame^] | 48 | src: tmux.conf |
49 | dest: "{{ ansible_user_dir }}/.tmux.conf" | ||||
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 50 |