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