big jenkinsfile update
This commit is contained in:
@ -2,30 +2,23 @@
|
||||
- name: Cosmos VCR Capture
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
create_data_dir: true
|
||||
kiosk_service_templates:
|
||||
- chrome_website: "http://localhost:8081"
|
||||
service_name: user_stream_control
|
||||
service_description: "VCR Capture User Stream Control"
|
||||
extra_service_configs: ""
|
||||
user_data_dir: "/opt/chrome/one"
|
||||
extra_chrome_configs: |
|
||||
--window-size="470,1080" \
|
||||
--user-data-dir=/opt/chrome/one \
|
||||
- chrome_website: "http://localhost:8888/stream"
|
||||
service_name: stream_preview
|
||||
service_description: "VCR Capture Preview Stream"
|
||||
extra_service_configs: ""
|
||||
user_data_dir: "/opt/chrome/two"
|
||||
extra_chrome_configs: |
|
||||
--window-size="1440,1080" \
|
||||
--user-data-dir=/opt/chrome/two \
|
||||
--window-position="480,0" \
|
||||
|
||||
|
||||
|
||||
vars_files:
|
||||
- /var/jenkins_home/ansible/roles/video_capture/defaults/kiosk.yaml
|
||||
|
||||
tasks:
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
- name: refresh special when kiosk update
|
||||
when: kiosk_refresh | bool
|
||||
set_fact:
|
||||
refresh_special: true
|
||||
|
||||
roles:
|
||||
- role: cosmos_init
|
||||
when: not refresh_special | bool
|
||||
@ -38,9 +31,6 @@
|
||||
|
||||
- role: video_capture
|
||||
|
||||
- role: chrome_kiosk
|
||||
when: GUI_deploy | bool
|
||||
|
||||
|
||||
...
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
- name: CD to ISO
|
||||
hosts: all
|
||||
become: yes
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
# Required Jenkins Vars
|
||||
# host_ip - string
|
||||
@ -11,8 +13,14 @@
|
||||
# kde_full - bool
|
||||
#
|
||||
|
||||
|
||||
|
||||
roles:
|
||||
- { role: cd_to_iso, tags: ['cd_to_iso'], }
|
||||
|
||||
- role: cosmos_init
|
||||
|
||||
- role: cd_to_iso
|
||||
|
||||
|
||||
|
||||
...
|
||||
|
||||
@ -2,13 +2,16 @@
|
||||
- name: CIFS Mount
|
||||
hosts: all
|
||||
become: yes
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
###############################################
|
||||
# Permanently Mount a CIFS Share
|
||||
###############################################
|
||||
|
||||
roles:
|
||||
- { role: cifs_mount, tags: ['cifs_mount'] }
|
||||
- role: cosmos_init
|
||||
- role: cifs_mount
|
||||
|
||||
# tasks:
|
||||
#
|
||||
|
||||
@ -7,11 +7,12 @@
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
terse_packages: true
|
||||
security_check_only: true
|
||||
|
||||
|
||||
roles:
|
||||
- role: cosmos_init
|
||||
# - { role: cosmos_init, tags: ['cosmos_init'], vars: {"terse_packages": "true"}, when: not refresh_only | bool }
|
||||
- { role: jenkins_vpn, tags: ['jenkins_vpn'] }
|
||||
- role: jenkins_vpn
|
||||
|
||||
...
|
||||
|
||||
@ -4,9 +4,13 @@
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
gather_only: true
|
||||
|
||||
roles:
|
||||
|
||||
- { role: cosmos_init, vars: {"gather_only": "true" } }
|
||||
- cosmos_init
|
||||
|
||||
- matt_capture
|
||||
|
||||
...
|
||||
@ -15,7 +15,13 @@
|
||||
###############################################
|
||||
|
||||
tasks:
|
||||
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
###############################################
|
||||
# Mount remote archive folder
|
||||
###############################################
|
||||
|
||||
@ -4,7 +4,15 @@
|
||||
become: yes
|
||||
|
||||
# this is meant just as a tiny playbook to run after the public key is injected with jenkins
|
||||
|
||||
tasks:
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
# Check System Architecture
|
||||
- name: Check CPU Arch
|
||||
shell: "dpkg --print-architecture"
|
||||
|
||||
@ -3,7 +3,11 @@
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
roles:
|
||||
- role: cosmos_init
|
||||
- role: pi-top
|
||||
|
||||
# I discovered that the user projects only work when lightdm is running
|
||||
|
||||
@ -9,6 +9,13 @@
|
||||
###############################################
|
||||
|
||||
tasks:
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
###############################################
|
||||
# Check System Architecture
|
||||
###############################################
|
||||
|
||||
@ -10,11 +10,13 @@
|
||||
terse_packages: true
|
||||
init_light: true
|
||||
vpn_init: false
|
||||
security_check_only: true
|
||||
|
||||
tasks:
|
||||
|
||||
|
||||
roles:
|
||||
- role: cosmos_init
|
||||
- role: puck_vpn
|
||||
|
||||
...
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
terse_packages: true
|
||||
|
||||
# Required Jenkins Vars
|
||||
# host_ip - string
|
||||
# new_hostname - string
|
||||
@ -14,7 +17,9 @@
|
||||
terse_packages: true
|
||||
|
||||
roles:
|
||||
- { role: cosmos_init, tags: ['cosmos_init'], vars: {"terse_packages": "true"}, when: not refresh_only | bool }
|
||||
- { role: pxe_server, tags: ['pxe_server'] }
|
||||
- role: cosmos_init
|
||||
when: not refresh_only | bool
|
||||
|
||||
- role: pxe_server
|
||||
|
||||
...
|
||||
|
||||
@ -5,6 +5,12 @@
|
||||
|
||||
tasks:
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
- name: Rename Endpoint
|
||||
include_tasks: /var/jenkins_home/ansible/roles/cosmos_init/tasks/set_hostname.yaml
|
||||
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
# Required Jenkins Vars
|
||||
# host_ip - string
|
||||
# new_hostname - string
|
||||
@ -12,6 +15,9 @@
|
||||
#
|
||||
|
||||
roles:
|
||||
|
||||
- role: cosmos_init
|
||||
|
||||
- role: rip_cd
|
||||
|
||||
|
||||
|
||||
57
test.yaml
57
test.yaml
@ -1,9 +1,17 @@
|
||||
---
|
||||
|
||||
# https://us.fanntik.top/product/fanttik-e1-max-precision-electric-screwdriver-5/
|
||||
- name: Ansible Test
|
||||
hosts: all
|
||||
become: yes
|
||||
vars:
|
||||
v4l2_id_string:
|
||||
- "earlytest"
|
||||
- "AV TO USB2.0"
|
||||
- "USB Video"
|
||||
- "generictest"
|
||||
- "beholdmybutthole"
|
||||
video_ID_0: ""
|
||||
ip_check_folder: "/opt/cosmos/ip_check"
|
||||
#vpn_endpoint: "172.30.2.1"
|
||||
#gather_only: true
|
||||
#cpu_architecture: "amd64"
|
||||
@ -51,21 +59,46 @@
|
||||
|
||||
|
||||
tasks:
|
||||
- name: include vars
|
||||
ansible.builtin.include_vars:
|
||||
file: /var/jenkins_home/ansible/roles/chrome_kiosk/files/kiosk.yaml
|
||||
name: kiosk_vars
|
||||
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
- name: get debian version info
|
||||
shell: 'cat /etc/os-release | grep VERSION_ID | cut -d\" -f2'
|
||||
register: os_version_id_output
|
||||
- debug:
|
||||
msg: "{{ kiosk_vars.kiosk_service_templates }}"
|
||||
msg: |
|
||||
{{ os_version_id_output.stdout_lines[0] }}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# - name: prereqs - get debian version info
|
||||
# shell: 'cat /etc/os-release | grep VERSION_ID | cut -d\" -f2'
|
||||
# register: os_version_id_output
|
||||
# - debug:
|
||||
# msg: |
|
||||
# {{ os_version_id_output }}
|
||||
# - name: video_capture - check for each video device
|
||||
# shell: "v4l2-ctl --list-devices 2> /dev/null | grep -A3 '{{ v4l2_strings }}' | grep video | head -n 1 | awk '{print $1}' || true"
|
||||
# register: v4l2_id_string_check
|
||||
# loop: "{{ v4l2_id_string }}"
|
||||
# loop_control:
|
||||
# loop_var: v4l2_strings
|
||||
#
|
||||
# - name: video_capture - get video device
|
||||
# when: video_check_output.stdout | length > 0
|
||||
# set_fact:
|
||||
# video_ID_0: "{{ video_check_output.stdout_lines[0] }}"
|
||||
# no_log: true
|
||||
# loop: "{{ v4l2_id_string_check.results }}"
|
||||
# loop_control:
|
||||
# loop_var: video_check_output
|
||||
#
|
||||
# - name: show output
|
||||
# debug:
|
||||
# msg: "{{ v4l2_id_string_check.results }}"
|
||||
# msg: "Result: {{ video_ID_0 }}"
|
||||
|
||||
|
||||
# /var/jenkins_home/ansible-files/lldp_scan/cosmos-deb{{ os_version_id_output.stdout_lines[0] }}.tar.gz
|
||||
|
||||
|
||||
|
||||
@ -8,6 +8,11 @@
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: user security check
|
||||
include_role:
|
||||
name: "cosmos_init"
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
- name: Get distribution version
|
||||
setup:
|
||||
|
||||
@ -3,6 +3,12 @@
|
||||
hosts: all
|
||||
become: yes
|
||||
|
||||
vars:
|
||||
security_check_only: true
|
||||
|
||||
roles:
|
||||
|
||||
- role: cosmos_init
|
||||
|
||||
- role: update_endpoint
|
||||
...
|
||||
@ -21,8 +21,13 @@
|
||||
bridge_name: "vmpbr0"
|
||||
|
||||
roles:
|
||||
- { role: cosmos_init, when: not run_stage_two | bool and not (update_party | bool) and not (service_only | bool)}
|
||||
- { role: net_bridge, when: not (run_stage_two | bool) and not (update_party | bool) and not (service_only | bool)}
|
||||
- { role: vm_party, when: run_stage_two | bool or update_party | bool or service_only | bool}
|
||||
- role: cosmos_init
|
||||
when: not run_stage_two | bool and not (update_party | bool) and not (service_only | bool)
|
||||
|
||||
- role: net_bridge
|
||||
when: not (run_stage_two | bool) and not (update_party | bool) and not (service_only | bool)
|
||||
|
||||
- role: vm_party
|
||||
when: run_stage_two | bool or update_party | bool or service_only | bool
|
||||
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user