-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxcode.yml
More file actions
36 lines (30 loc) · 900 Bytes
/
xcode.yml
File metadata and controls
36 lines (30 loc) · 900 Bytes
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
---
# Xcode Installation Example
#
# Author: Assaf Feuerstein
#
# Quick example to install Xcode on target hosts.
#
# Usage:
# ansible-playbook xcode.yml -i hosts.ini -l build-mac-01
# ansible-playbook xcode.yml -i hosts.ini -e "xcode_version=16.0"
- name: Install Xcode
hosts: all
remote_user: "{{ ansible_user | default('admin') }}"
gather_facts: yes
become: yes
vars:
xcode_version: "15.4"
build_user: "{{ build_user | default('buildagent') }}"
roles:
- role: rosetta-install
when: ansible_architecture == "arm64"
- role: xcode
post_tasks:
- name: Verify Xcode installation
shell: /usr/bin/plutil -p /Applications/Xcode.app/Contents/Info.plist | grep CFBundleShortVersionString
register: xcode_result
changed_when: false
- name: Display result
debug:
msg: "Xcode installed: {{ xcode_result.stdout }}"