-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunity.yml
More file actions
41 lines (35 loc) · 1.17 KB
/
unity.yml
File metadata and controls
41 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
# Unity Installation Example
#
# Author: Assaf Feuerstein
#
# Quick example to install Unity via Unity Hub.
#
# Usage:
# ansible-playbook unity.yml -i hosts.ini -l unity-mac-01
# ansible-playbook unity.yml -i hosts.ini -e "unity_version=6000.0.0f1"
# ansible-playbook unity.yml -i hosts.ini -e "unity_modules=android,ios"
- name: Install Unity
hosts: all
remote_user: "{{ ansible_user | default('admin') }}"
gather_facts: yes
become: yes
vars:
unity_version: "2022.3.20f1"
unity_modules: "android,android-sdk-ndk-tools,android-open-jdk,ios,webgl"
build_user: "{{ build_user | default('buildagent') }}"
roles:
- role: rosetta-install
when: ansible_architecture == "arm64"
- role: unityhub-install
- role: unity-install
post_tasks:
- name: List installed Unity versions
command: /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless editors --installed
register: unity_list
become_user: "{{ build_user }}"
changed_when: false
ignore_errors: true
- name: Display installed versions
debug:
msg: "{{ unity_list.stdout_lines | default(['No Unity versions installed']) }}"