-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
166 lines (148 loc) · 4.29 KB
/
local.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
- name: Environment Setup
hosts: all
become: true
tasks:
- name: Update and upgrade apt packages (Debian-based)
ansible.builtin.apt:
update_cache: true
upgrade: dist
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Update and upgrade brew packages (macOS)
community.general.homebrew:
update_homebrew: true
upgrade_all: true
when: ansible_facts['os_family'] == "Darwin"
become: false
tags:
- rn
- name: Install Node.js (Debian-based)
ansible.builtin.apt:
name: nodejs
state: present
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Install Node.js (macOS)
community.general.homebrew:
name: node
state: present
when: ansible_facts['os_family'] == "Darwin"
become: false
tags:
- rn
- name: Install npm (Debian-based)
ansible.builtin.apt:
name: npm
state: present
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Install yarn
ansible.builtin.command: npm install --global yarn
args:
creates: /Users/eduardolopes/.nvm/versions/node/v20.12.2/bin/yarn
tags:
- rn
- name: Install Watchman (Debian-based)
ansible.builtin.apt:
name: watchman
state: present
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Install Watchman (macOS)
community.general.homebrew:
name: watchman
state: present
when: ansible_facts['os_family'] == "Darwin"
become: false
tags:
- rn
- name: Install Java Development Kit (JDK) (Debian-based)
ansible.builtin.apt:
name: openjdk-8-jdk
state: present
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Install Java Development Kit (JDK) (macOS)
community.general.homebrew:
name: openjdk
state: present
when: ansible_facts['os_family'] == "Darwin"
become: false
tags:
- rn
- name: Install Android Studio dependencies (Debian-based)
ansible.builtin.apt:
name: "{{ item }}"
state: present
loop:
- libc6:i386
- libncurses5:i386
- libstdc++6:i386
- lib32z1
- libbz2-1.0:i386
when: ansible_facts['os_family'] == "Debian"
tags:
- rn
- name: Install Gnu-tar (macOS)
community.general.homebrew:
name: gnu-tar
state: present
when: ansible_facts['os_family'] == "Darwin"
become: false
tags:
- rn
- name: Download Android Studio
ansible.builtin.get_url:
url: https://redirector.gvt1.com/edgedl/android/studio/install/2024.1.1.12/android-studio-2024.1.1.12-mac_arm.dmg
dest: /tmp/android-studio.dmg
mode: '0644'
when: ansible_facts['os_family'] == "Darwin"
tags:
- rn
- name: Mount the DMG file
ansible.builtin.command: hdiutil attach /tmp/android-studio.dmg
args:
creates: /Volumes/Android\ Studio
when: ansible_facts['os_family'] == "Darwin"
tags:
- rn
- name: Wait for DMG to mount
ansible.builtin.wait_for:
path: /Volumes/Android\ Studio/Android\ Studio.app
state: present
timeout: 30
when: ansible_facts['os_family'] == "Darwin"
tags:
- rn
- name: Copy Android Studio to Applications
ansible.builtin.command: cp -R /Volumes/Android\ Studio/Android\ Studio.app /Applications/
args:
creates: /Applications/Android\ Studio.app
when: ansible_facts['os_family'] == "Darwin"
tags:
- rn
- name: Unmount the DMG file
ansible.builtin.command: hdiutil detach /Volumes/Android\ Studio
args:
removes: /Volumes/Android\ Studio
when: ansible_facts['os_family'] == "Darwin"
tags:
- rn
- name: Set up Android Studio environment variables
ansible.builtin.lineinfile:
path: /etc/profile
line: 'export ANDROID_HOME=/opt/android-studio'
state: present
tags:
- rn
- name: Install React Native CLI
community.general.npm:
name: react-native-cli
global: true
tags:
- rn