2018-02-10 22:59:26 +01:00

40 lines
898 B
YAML

---
# tasks file for MicroJoe.post-install
- name: Update and upgrade packages
apt:
update_cache: true
upgrade: true
- name: Install useful sysadmin tooling
apt:
name: "{{ item }}"
state: present
with_items:
- tmux
- htop
- tree
- vim
- mosh
- toilet
- figlet
- name: Install cool scaleway-inspirated motd script for non-scaleway hosts
copy:
src: 50-scw
dest: /etc/update-motd.d/50-scw
mode: 755
when: server_provider != "scaleway"
- name: Use alternative motd.head file
replace:
path: /etc/update-motd.d/50-scw
regexp: '^\[ -f \/etc\/motd\.head \] && cat \/etc\/motd\.head \|\| true$'
replace: "[ -f /etc/motd.head.alt ] && cat /etc/motd.head.alt || true"
backup: yes
- name: Generate cool motd.head
shell: toilet -f future -F metal $(hostname) > /etc/motd.head.alt
args:
creates: /etc/motd.head.alt