mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-07-03 00:03:05 +02:00
upt playbook
This commit is contained in:
59
playbooks/00_setup_display.yml
Normal file
59
playbooks/00_setup_display.yml
Normal file
@ -0,0 +1,59 @@
|
||||
- hosts: odroid_master
|
||||
name: Setup info display
|
||||
become: true
|
||||
tasks:
|
||||
- name: Install deps...
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- python3-pip
|
||||
- python3-dev
|
||||
- name: Remove file (delete file)
|
||||
ansible.builtin.file:
|
||||
path: /usr/lib/python3.11/EXTERNALLY-MANAGED
|
||||
state: absent
|
||||
|
||||
- name: Install bottle python package
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- RPLCD
|
||||
- psutil
|
||||
- smbus2
|
||||
- uptime
|
||||
- name: Upload led control scripts
|
||||
ansible.builtin.copy:
|
||||
src: scripts/lcd_control.py
|
||||
dest: /usr/bin/lcd_control.py
|
||||
- name: Upload led control service
|
||||
ansible.builtin.copy:
|
||||
src: services/lcd_control.service
|
||||
dest: /etc/systemd/system/
|
||||
- name: Upload led control scripts
|
||||
ansible.builtin.copy:
|
||||
src: scripts/lcd_control_restart.py
|
||||
dest: /usr/bin/lcd_control_restart.py
|
||||
- name: Upload led control service
|
||||
ansible.builtin.copy:
|
||||
src: services/lcd_control_restart.service
|
||||
dest: /etc/systemd/system/
|
||||
- name: Upload led control scripts
|
||||
ansible.builtin.copy:
|
||||
src: scripts/lcd_control_start.py
|
||||
dest: /usr/bin/lcd_control_start.py
|
||||
- name: Upload led control service
|
||||
ansible.builtin.copy:
|
||||
src: services/lcd_control_start.service
|
||||
dest: /etc/systemd/system/
|
||||
- name: reload systemctl
|
||||
ansible.builtin.command: systemctl daemon-reload
|
||||
- name: Enable service startup lcd_control
|
||||
ansible.builtin.command: systemctl enable lcd_control.service
|
||||
- name: Starting service lcd_control
|
||||
ansible.builtin.command: systemctl start lcd_control.service
|
||||
- name: Enable service startup lcd_control_restart.service
|
||||
ansible.builtin.command: systemctl enable lcd_control_restart.service
|
||||
- name: Enable service startup lcd_control_start.service
|
||||
ansible.builtin.command: systemctl enable lcd_control_start.service
|
||||
# - name: Start service lcd_control_restart.service
|
||||
# ansible.builtin.command: systemctl start lcd_control_restart.service
|
||||
# - name: start lcd script
|
||||
# shell: cd /root; nohup python3 lcd_control.py >/dev/null 2>&1 &
|
Reference in New Issue
Block a user