blob: 7874b288bcb2b43c93054bc1b89c6b654186251e [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
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 Williams8625d042016-02-26 14:32:43 -070017---
Zack Williams5223dd92017-02-28 23:38:02 -070018# file: common-prep/tasks/main.yml
Zack Williams8625d042016-02-26 14:32:43 -070019
Zack Williams6f5a6e72016-08-10 17:45:27 -070020- 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 Williams35624562016-08-28 17:12:26 -070027- name: Reboot if required after dist_upgrade
Zack Williams6f5a6e72016-08-10 17:45:27 -070028 when: run_dist_upgrade
Zack Williams35624562016-08-28 17:12:26 -070029 stat:
30 path: /var/run/reboot-required
31 register: reboot_required
32 changed_when: reboot_required.stat.exists
Zack Williamsa9421e22016-03-02 13:53:37 -070033 notify:
Zack Williams6c3b8732016-03-15 09:57:07 -070034 - restart host
35 - wait for host
Zack Williams8625d042016-02-26 14:32:43 -070036
37- name: Install standard packages
Zack Williams7ec058b2016-05-02 10:10:39 -070038 apt:
Zack Williams5223dd92017-02-28 23:38:02 -070039 pkg: "{{ item }}"
40 update_cache: yes
41 cache_valid_time: 3600
Zack Williams8625d042016-02-26 14:32:43 -070042 with_items:
43 - tmux
44 - vim
45
Zack Williams1d8a6822016-06-08 08:33:43 -070046- name: Remove annoying default editors
47 apt:
Zack Williams6f5a6e72016-08-10 17:45:27 -070048 pkg: "{{ item }}"
49 state: absent
50 update_cache: yes
51 cache_valid_time: 3600
Zack Williams1d8a6822016-06-08 08:33:43 -070052 with_items:
53 - nano
54 - jove
55
Zack Williams8625d042016-02-26 14:32:43 -070056- name: Enable vim syntax highlighting
Zack Williams5223dd92017-02-28 23:38:02 -070057 lineinfile:
58 dest: '/etc/vim/vimrc'
59 regexp: '^\s*syntax on'
60 line: 'syntax on'
Zack Williamsa9421e22016-03-02 13:53:37 -070061
Zack Williamsf5d8caf2016-06-03 13:11:09 -070062- name: Configure tmux
63 copy:
Zack Williams5223dd92017-02-28 23:38:02 -070064 src: tmux.conf
65 dest: "{{ ansible_user_dir }}/.tmux.conf"
Zack Williams6f5a6e72016-08-10 17:45:27 -070066