--- - name: Install python3 IRC library apt: name: python3-irc state: present update_cache: true register: apt_result retries: 3 until: apt_result is succeeded - name: Install Flask for python3 apt: name: python3-flask state: present update_cache: true register: apt_result retries: 3 until: apt_result is succeeded - name: Clone NinjaBot code git: repo: https://gitlab.crans.org/nounous/NinjaBot.git dest: /var/local/ninjabot version: master - name: Deploy NinjaBot configuration template: src: ninjabot/ninjabot.json.j2 dest: /var/local/ninjabot/ninjabot.json - name: Deploy NinjaBot systemd unit template: src: systemd/system/ninjabot.service.j2 dest: /etc/systemd/system/ninjabot.service mode: 0644 - name: Load and activate NinjaBot service systemd: name: ninjabot daemon_reload: true enabled: true state: started - name: Indicate NinjaBot in motd template: src: update-motd.d/05-service.j2 dest: /etc/update-motd.d/05-ninjabot mode: 0755