Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 1 | --- |
| 2 | # file: roles/common-prep/tasks/main.yml |
| 3 | |
| 4 | - name: Upgrade system to current using apt |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 5 | apt: |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 6 | upgrade=dist |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 7 | update_cache=yes |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 8 | cache_valid_time=3600 |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 9 | |
| 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 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: |
| 23 | pkg={{ item }} |
| 24 | state=present |
| 25 | update_cache=yes |
| 26 | cache_valid_time=3600 |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 27 | 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 Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 35 | |