Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 1 | --- |
| 2 | # file: roles/common-prep/tasks/main.yml |
| 3 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 4 | - stat: |
| 5 | path=/var/run/reboot-required |
| 6 | register: reboot-required |
| 7 | |
| 8 | - name: reboot if required |
| 9 | when: reboot-required.exists is defined |
| 10 | debug: msg="System will reboot" |
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 11 | notify: |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 12 | - restart host |
| 13 | - wait for host |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 14 | |
| 15 | - name: Install standard packages |
Zack Williams | 7ec058b | 2016-05-02 10:10:39 -0700 | [diff] [blame] | 16 | apt: |
| 17 | pkg={{ item }} |
| 18 | state=present |
| 19 | update_cache=yes |
| 20 | cache_valid_time=3600 |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 21 | with_items: |
| 22 | - tmux |
| 23 | - vim |
| 24 | |
Zack Williams | 1d8a682 | 2016-06-08 08:33:43 -0700 | [diff] [blame] | 25 | - name: Remove annoying default editors |
| 26 | apt: |
| 27 | pkg={{ item }} |
| 28 | state=absent |
| 29 | update_cache=yes |
| 30 | cache_valid_time=3600 |
| 31 | with_items: |
| 32 | - nano |
| 33 | - jove |
| 34 | |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 35 | - name: Enable vim syntax highlighting |
| 36 | lineinfile: dest=/etc/vim/vimrc |
| 37 | regexp="^\s*syntax on" |
| 38 | line="syntax on" |
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 39 | |
Zack Williams | f5d8caf | 2016-06-03 13:11:09 -0700 | [diff] [blame] | 40 | - name: Configure tmux |
| 41 | copy: |
| 42 | src=tmux.conf |
| 43 | dest="{{ ansible_user_dir }}/.tmux.conf" |