blob: e2368e9f45d00afb7ac23da6e15a8cce87add69a [file] [log] [blame]
---
# file: roles/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: Determine if a reboot if required
when: run_dist_upgrade
stat: path=/var/run/reboot-required
register: reboot-required
- name: Perform a reboot if required
when: run_dist_upgrade and reboot-required.exists is defined
debug: msg="System will reboot"
notify:
- restart host
- wait for host
- name: Install standard packages
apt:
pkg={{ item }}
state=present
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"