--- # 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