Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 16 | # file: common-prep/tasks/main.yml |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 17 | |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 18 | - name: Upgrade system to current using apt |
| 19 | when: run_dist_upgrade |
| 20 | apt: |
| 21 | upgrade: dist |
| 22 | update_cache: yes |
| 23 | cache_valid_time: 3600 |
| 24 | |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 25 | - name: Reboot if required after dist_upgrade |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 26 | when: run_dist_upgrade |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 27 | stat: |
| 28 | path: /var/run/reboot-required |
| 29 | register: reboot_required |
| 30 | changed_when: reboot_required.stat.exists |
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 31 | notify: |
Zack Williams | 6c3b873 | 2016-03-15 09:57:07 -0700 | [diff] [blame] | 32 | - restart host |
| 33 | - wait for host |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 34 | |
| 35 | - name: Install standard packages |
Zack Williams | 7ec058b | 2016-05-02 10:10:39 -0700 | [diff] [blame] | 36 | apt: |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 37 | pkg: "{{ item }}" |
| 38 | update_cache: yes |
| 39 | cache_valid_time: 3600 |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 40 | with_items: |
| 41 | - tmux |
| 42 | - vim |
| 43 | |
Zack Williams | 1d8a682 | 2016-06-08 08:33:43 -0700 | [diff] [blame] | 44 | - name: Remove annoying default editors |
| 45 | apt: |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 46 | pkg: "{{ item }}" |
| 47 | state: absent |
| 48 | update_cache: yes |
| 49 | cache_valid_time: 3600 |
Zack Williams | 1d8a682 | 2016-06-08 08:33:43 -0700 | [diff] [blame] | 50 | with_items: |
| 51 | - nano |
| 52 | - jove |
| 53 | |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 54 | - name: Enable vim syntax highlighting |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 55 | lineinfile: |
| 56 | dest: '/etc/vim/vimrc' |
| 57 | regexp: '^\s*syntax on' |
| 58 | line: 'syntax on' |
Zack Williams | a9421e2 | 2016-03-02 13:53:37 -0700 | [diff] [blame] | 59 | |
Zack Williams | f5d8caf | 2016-06-03 13:11:09 -0700 | [diff] [blame] | 60 | - name: Configure tmux |
| 61 | copy: |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 62 | src: tmux.conf |
| 63 | dest: "{{ ansible_user_dir }}/.tmux.conf" |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 64 | |