blob: 1ae503183e1efded074f4537280496fc220fad54 [file] [log] [blame]
Zack Williamsf6cc0122018-03-30 16:00:49 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# 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 Williams5223dd92017-02-28 23:38:02 -070016# file: common-prep/tasks/main.yml
Zack Williams8625d042016-02-26 14:32:43 -070017
Zack Williams6f5a6e72016-08-10 17:45:27 -070018- 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 Williams35624562016-08-28 17:12:26 -070025- name: Reboot if required after dist_upgrade
Zack Williams6f5a6e72016-08-10 17:45:27 -070026 when: run_dist_upgrade
Zack Williams35624562016-08-28 17:12:26 -070027 stat:
28 path: /var/run/reboot-required
29 register: reboot_required
30 changed_when: reboot_required.stat.exists
Zack Williamsa9421e22016-03-02 13:53:37 -070031 notify:
Zack Williams6c3b8732016-03-15 09:57:07 -070032 - restart host
33 - wait for host
Zack Williams8625d042016-02-26 14:32:43 -070034
35- name: Install standard packages
Zack Williams7ec058b2016-05-02 10:10:39 -070036 apt:
Zack Williams5223dd92017-02-28 23:38:02 -070037 pkg: "{{ item }}"
38 update_cache: yes
39 cache_valid_time: 3600
Zack Williams8625d042016-02-26 14:32:43 -070040 with_items:
41 - tmux
42 - vim
43
Zack Williams1d8a6822016-06-08 08:33:43 -070044- name: Remove annoying default editors
45 apt:
Zack Williams6f5a6e72016-08-10 17:45:27 -070046 pkg: "{{ item }}"
47 state: absent
48 update_cache: yes
49 cache_valid_time: 3600
Zack Williams1d8a6822016-06-08 08:33:43 -070050 with_items:
51 - nano
52 - jove
53
Zack Williams8625d042016-02-26 14:32:43 -070054- name: Enable vim syntax highlighting
Zack Williams5223dd92017-02-28 23:38:02 -070055 lineinfile:
56 dest: '/etc/vim/vimrc'
57 regexp: '^\s*syntax on'
58 line: 'syntax on'
Zack Williamsa9421e22016-03-02 13:53:37 -070059
Zack Williamsf5d8caf2016-06-03 13:11:09 -070060- name: Configure tmux
61 copy:
Zack Williams5223dd92017-02-28 23:38:02 -070062 src: tmux.conf
63 dest: "{{ ansible_user_dir }}/.tmux.conf"
Zack Williams6f5a6e72016-08-10 17:45:27 -070064