node.js dashboard works
This commit is contained in:
65
tasks/initialize.yaml
Normal file
65
tasks/initialize.yaml
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
|
||||
- name: Initialize - set service_only when ran through cosmos-server
|
||||
when: refresh_special | bool
|
||||
set_fact:
|
||||
service_only: true
|
||||
|
||||
- name: Initialize - Install Packages
|
||||
when: not quick_refresh | bool
|
||||
apt:
|
||||
name:
|
||||
- "{{ ssd_health_packages_item }}"
|
||||
state: present
|
||||
loop: "{{ ssd_health_packages }}"
|
||||
loop_control:
|
||||
loop_var: ssd_health_packages_item
|
||||
|
||||
- name: "Initialize - create {{ autologin_user }} user"
|
||||
when: not quick_refresh | bool
|
||||
user:
|
||||
name: "{{ autologin_user }}"
|
||||
groups: disk
|
||||
password: "{{ autologin_password | password_hash('sha512') }}"
|
||||
shell: /bin/bash
|
||||
|
||||
- name: "Initialize - ensure {{ autologin_user }} home folder exists"
|
||||
when: not quick_refresh | bool
|
||||
file:
|
||||
path: "/home/{{ autologin_user }}"
|
||||
state: directory
|
||||
owner: "{{ autologin_user }}"
|
||||
group: "{{ autologin_user }}"
|
||||
mode: '0700'
|
||||
|
||||
- name: Initialize - set vars when needed
|
||||
when: quick_refresh | bool or refresh_special | bool
|
||||
block:
|
||||
|
||||
- name: Check CPU Arch
|
||||
shell: "dpkg --print-architecture"
|
||||
register: cpu_architecture_output
|
||||
|
||||
- name: Set bool armcpu_check
|
||||
when: '"arm" in cpu_architecture_output.stdout'
|
||||
set_fact:
|
||||
armcpu_check: true
|
||||
- debug: |
|
||||
msg="CPU architecture: {{ cpu_architecture_output.stdout_lines[0] }}"
|
||||
msg="armcpu_check: {{ armcpu_check }}"
|
||||
|
||||
- name: Initialize - docker-buildx handler
|
||||
when: armcpu_check | bool
|
||||
block:
|
||||
|
||||
- name: docker-buildx handler - download deb file
|
||||
get_url:
|
||||
url: "http://ftp.us.debian.org/debian/pool/main/d/docker-buildx/docker-buildx_0.13.1+ds1-3_arm64.deb"
|
||||
dest: "/tmp/docker-buildx_0.13.1+ds1-3_arm64.deb"
|
||||
mode: '0644'
|
||||
|
||||
- name: docker-buildx handler - install package
|
||||
apt:
|
||||
deb: "/tmp/docker-buildx_0.13.1+ds1-3_arm64.deb"
|
||||
|
||||
...
|
||||
Reference in New Issue
Block a user