blob: 1ae503183e1efded074f4537280496fc220fad54 [file] [log] [blame]
---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# file: common-prep/tasks/main.yml
- name: Upgrade system to current using apt
when: run_dist_upgrade
apt:
upgrade: dist
update_cache: yes
cache_valid_time: 3600
- name: Reboot if required after dist_upgrade
when: run_dist_upgrade
stat:
path: /var/run/reboot-required
register: reboot_required
changed_when: reboot_required.stat.exists
notify:
- restart host
- wait for host
- name: Install standard packages
apt:
pkg: "{{ item }}"
update_cache: yes
cache_valid_time: 3600
with_items:
- tmux
- vim
- name: Remove annoying default editors
apt:
pkg: "{{ item }}"
state: absent
update_cache: yes
cache_valid_time: 3600
with_items:
- nano
- jove
- name: Enable vim syntax highlighting
lineinfile:
dest: '/etc/vim/vimrc'
regexp: '^\s*syntax on'
line: 'syntax on'
- name: Configure tmux
copy:
src: tmux.conf
dest: "{{ ansible_user_dir }}/.tmux.conf"