setup-life-display

Instructions and scripts to setup sdl2-life on a Raspberry Pi
git clone https://www.brianlane.com/git/setup-life-display
Log | Files | Refs | README

setup.yml (2012B)


      1 ---
      2 - hosts: lifedisplay
      3   become_user: root
      4   become: true
      5   tasks:
      6     - name: Make sure needed applications are installed
      7       apt:
      8         name:
      9           - python3
     10           - tmux
     11           - watchdog
     12           - golang
     13           - libsdl2-2.0-0
     14           - libsdl2-dev
     15           - libsdl2-ttf-2.0-0
     16           - libsdl2-ttf-dev
     17           - git
     18         state: latest
     19         update_cache: true
     20 
     21     - name: Install the watchdog config
     22       copy:
     23         src: "./configs/{{ item }}"
     24         dest: /etc/
     25         owner: root
     26         group: root
     27         mode: 0644
     28       with_items:
     29         - watchdog.conf
     30 
     31     - name: Start the watchdog service
     32       service:
     33         name: watchdog
     34         state: started
     35         enabled: true
     36 
     37     - name: Install the systemd service files
     38       copy:
     39         src: "./configs/{{ item }}"
     40         dest: /lib/systemd/system/
     41         owner: root
     42         group: root
     43         mode: 0644
     44       with_items:
     45         - tmux.service
     46         - tmux@.service
     47 
     48     - name: Disable getty@tty1
     49       systemd:
     50         name: getty@tty1
     51         state: stopped
     52         enabled: false
     53         daemon_reload: true
     54 
     55     - name: Add multi-user.target.wants
     56       file:
     57         dest: /lib/systemd/system/multi-user.target.wants/
     58         state: directory
     59 
     60     - name: Add tmux@tty1.service to multi-user.target.wants
     61       file:
     62         src: /lib/systemd/system/tmux@.service
     63         dest: /lib/systemd/system/multi-user.target.wants/tmux@tty1.service
     64         state: link
     65 
     66     - name: Copy over tmux.conf
     67       copy:
     68         src: ./configs/tmux.conf
     69         dest: /home/life/.tmux.conf
     70         owner: life
     71         group: life
     72 
     73     - name: Copy over run-life-server
     74       copy:
     75         src: ./configs/run-life-server
     76         dest: /home/life/run-life-server
     77         owner: life
     78         group: life
     79         mode: 0755
     80 
     81     - name: Change ownership of /opt/sdl2-life
     82       file:
     83         dest: /opt/sdl2-life
     84         owner: life
     85         group: life
     86         mode: u=rwX,g=rX,o=rX
     87         recurse: true