main.yml (1297B)
1 --- 2 - name: Install script dependencies 3 ansible.builtin.apt: 4 name: 5 - sqlite3 6 - curl 7 state: present 8 update_cache: true 9 tags: [scripts] 10 11 - name: Create ~/.scripts directory 12 ansible.builtin.file: 13 path: /home/{{ vnc_user }}/.scripts 14 state: directory 15 owner: "{{ vnc_user }}" 16 group: "{{ vnc_user }}" 17 mode: '0755' 18 tags: [scripts] 19 20 - name: Copy encode script 21 ansible.builtin.copy: 22 src: encode.sh 23 dest: /home/{{ vnc_user }}/.scripts/encode 24 owner: "{{ vnc_user }}" 25 group: "{{ vnc_user }}" 26 mode: '0755' 27 tags: [scripts] 28 29 - name: Deploy rip script 30 ansible.builtin.template: 31 src: rip.sh.j2 32 dest: /home/{{ vnc_user }}/.scripts/rip 33 owner: "{{ vnc_user }}" 34 group: "{{ vnc_user }}" 35 mode: '0755' 36 tags: [scripts] 37 38 - name: Deploy notify script 39 ansible.builtin.template: 40 src: notify.sh.j2 41 dest: /home/{{ vnc_user }}/.scripts/notify 42 owner: "{{ vnc_user }}" 43 group: "{{ vnc_user }}" 44 mode: '0755' 45 tags: [scripts] 46 47 - name: Add ~/.scripts to PATH in .bashrc 48 ansible.builtin.lineinfile: 49 path: /home/{{ vnc_user }}/.bashrc 50 line: 'export PATH="$HOME/.scripts:$PATH"' 51 state: present 52 create: true 53 owner: "{{ vnc_user }}" 54 group: "{{ vnc_user }}" 55 mode: '0644' 56 tags: [scripts]