-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplaybook-runner.yml
855 lines (703 loc) · 25.1 KB
/
playbook-runner.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
- name: install software available in the ubuntu-22.04 runner image
hosts: default
become: true
tasks:
- name: update APT cache
apt:
update_cache: true
cache_valid_time: 3600
- name: create RUNNER_TOOL_CACHE directory
file:
path: /opt/hostedtoolcache
owner: admin
group: admin
state: directory
- name: create .NET directory
file:
path: /usr/share/dotnet
owner: admin
group: admin
state: directory
# Language and Runtime[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#language-and-runtime
- name: install Bash
apt:
name: bash
install_recommends: false
- name: install clang, clang-format and clang-tidy
apt:
name:
- clang
- clang-format
- clang-tidy
install_recommends: false
- name: install Dash
apt:
name: dash
install_recommends: false
- name: install GNU C++ and Fortran
apt:
name:
- g++
- gfortran
install_recommends: false
- name: install Julia
snap:
name: julia
classic: true
# Skip installing Kotlin because it's not available on arm64 Linux yet[1]
#
# [1]: https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
- name: install APT transport for downloading packages via HTTPS and common X.509 certificates
apt:
name:
- apt-transport-https
- ca-certificates
install_recommends: false
- name: install GnuPG (required by the apt_key module)
apt:
name: gpg
install_recommends: false
- name: add Mono key
apt_key:
id: 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
keyserver: "hkp://keyserver.ubuntu.com:80"
keyring: /etc/apt/trusted.gpg.d/mono.gpg
- name: add Mono repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/mono.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main"
filename: mono
- name: install Mono and MSBuild
apt:
name:
- mono-devel
- msbuild
install_recommends: false
- name: add Nodesource key
apt_key:
id: 6F71F525282841EEDAF851B42F59B5F99B1BE0B4
url: "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key"
keyring: /etc/apt/trusted.gpg.d/nodesource.gpg
- name: add Nodesource repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main"
filename: nodesource
- name: install Node.js
apt:
name: nodejs
install_recommends: false
- name: install Perl
apt:
name: perl
install_recommends: false
- name: install Python
apt:
name:
- python3
- python3-dev
- python3-venv
install_recommends: false
- name: install Ruby
apt:
name:
- ruby
- ruby-dev
install_recommends: false
# Skip installing Swift because no Debian/Snap package is available[1]
#
# [1]: https://www.swift.org/install/linux/
# Package Management[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#package-management
# >Ubuntu 22.04 ship with CPAN installed by default. To compile and install package from CPAN
# >you may also need to install build tools: [...][1]
#
# [1]: https://innovativeinnovation.github.io/ubuntu-setup/perl/cpan.html
- name: install build tools required for CPAN
apt:
name: build-essential
install_recommends: false
- name: add Balto key for Helm
apt_key:
id: 81BF832E2F19CD2AA0471959294AC4827C1A168A
url: "https://baltocdn.com/helm/signing.asc"
keyring: /etc/apt/trusted.gpg.d/balto-helm.gpg
- name: add Balto Helm repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/balto-helm.gpg] https://baltocdn.com/helm/stable/debian/ all main"
filename: balto-helm
- name: install Helm
apt:
name: helm
install_recommends: false
# Skip installing Homebrew as it's not supported on arm64 Linux yet[1]
#
# [1]: https://docs.brew.sh/Homebrew-on-Linux#arm-unsupported
# Skip installing Miniconda as it has no .deb/Snap package(s)[1]
#
# [1]: https://docs.conda.io/projects/miniconda/en/latest/
# Skip installing NPM as it's already provided by the Node.js
- name: install NuGet
apt:
name: nuget
install_recommends: false
- name: install Pip
apt:
name: python3-pip
install_recommends: false
- name: install Pipx
pip:
name: pipx
- name: install RubyGems
apt:
name: ruby-rubygems
install_recommends: false
# Skip installing Vcpkg because it has no .deb/Snap package(s)[1]
#
# [1]: https://github.com/microsoft/vcpkg?#quick-start-unix
# Yarn is already shipped with NPM, so we only need to enable the Corepack[1]
#
# [1]: https://yarnpkg.com/getting-started/install
- name: install Yarn
command: corepack enable
# Project Management[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#project-management
- name: install Lerna
npm:
name: lerna
global: true
- name: install Maven
apt:
name: maven
install_recommends: false
# Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#tools
- name: install Ansible
community.general.pipx:
name: ansible
install_deps: true
# Skip installing apt-fast for now because it brings no
# new functionality, it's just an optimization for APT
# Skip installing AzCopy because it has no .deb/Snap package(s)[1]
#
# [1]: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10#download-azcopy
- name: install Bazelisk to install Bazel
npm:
name: "@bazel/bazelisk"
global: true
- name: install Bazel
command: bazel
# Skip installing Bicep (language for deploying Azure resources)
# because it has no .deb/Snap package(s) and can be easily
# installed using the Azure CLI[1]
#
# [1]: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/install
- name: install Buildah
apt:
name: buildah
install_recommends: false
- name: install CMake
apt:
name: cmake
install_recommends: false
# Skip installing CodeQL Action Bundle because it has no .deb/Snap package(s)[1]
#
# [1]: https://github.com/github/codeql-action
- name: install Amazon ECR Docker Credential Helper
apt:
name: amazon-ecr-credential-helper
install_recommends: false
- name: add Docker key
apt_key:
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
url: "https://download.docker.com/linux/ubuntu/gpg"
keyring: /etc/apt/trusted.gpg.d/docker.gpg
- name: add Docker repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable"
filename: docker
- name: install Docker Compose plugin
apt:
name: docker-compose-plugin
install_recommends: false
- name: install Docker Buildx plugin
apt:
name: docker-buildx-plugin
install_recommends: false
- name: install Docker Client
apt:
name: docker-ce-cli
install_recommends: false
- name: install Docker Server
apt:
name:
- docker-ce
- containerd.io
install_recommends: false
# Skip installing Fastlane
#
# Most likely is at https://github.com/fastlane/fastlane/,
# distributed as RubyGems package, so should be easy to install.
- name: install Git, Git LFS and git-ftp
apt:
name:
- git
- git-lfs
- git-ftp
install_recommends: false
- name: install haveged
apt:
name: haveged
install_recommends: false
# Not installing Heroku because it has no .deb packages[1] and the Snap package
# was last updated almost 2 years ago (in 2022)[2]
#
# [1]: https://devcenter.heroku.com/articles/heroku-cli
# [2]: https://snapcraft.io/heroku
- name: install jq
apt:
name: jq
install_recommends: false
- name: install kind
get_url:
url: https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-arm64
dest: /usr/local/bin/kind
mode: a+x
when: ansible_architecture == "aarch64"
- name: install kind
get_url:
url: https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-amd64
dest: /usr/local/bin/kind
mode: a+x
when: ansible_architecture == "x86_64"
- name: install kubectl
snap:
name: kubectl
classic: true
# Not installing Kustomize because it has no .deb/Snap package(s)[1]
#
# [1]: https://kubectl.docs.kubernetes.io/installation/kustomize/
# Not installing Leiningen because it has no .deb/Snap package(s)[1]
#
# [1]: https://leiningen.org/#install
- name: install MediaInfo
apt:
name: mediainfo
install_recommends: false
- name: install Mercurial
apt:
name: mercurial
install_recommends: false
# Not installing minikube because it has no .deb/Snap package(s)[1]
#
# [1]: https://minikube.sigs.k8s.io/docs/start/
# Not installing n because it doesn't seem to be very popular
# and can be easily installed via the npm[1]
#
# [1]: https://www.npmjs.com/package/n
# Not installing Newman because it doesn't seem to be very popular
# and can be easily installed via the npm[1]
#
# [1]: https://github.com/actions/runner-images/issues/1063
# Not installing nvm because it has no .deb/Snap package(s)[1]
#
# [1]: https://github.com/nvm-sh/nvm#installing-and-updating
- name: install OpenSSL
apt:
name: openssl
install_recommends: false
- name: add HashiCorp key
apt_key:
id: 798AEC654E5C15428C8E42EEAA16FCBCA621E701
url: "https://apt.releases.hashicorp.com/gpg"
keyring: /etc/apt/trusted.gpg.d/hashicorp.gpg
- name: add HashiCorp repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com jammy main"
filename: hashicorp
- name: install Packer
apt:
name: packer
install_recommends: false
# Not installing Parcel because it can be easily installed via npm[1]
#
# [1]: https://parceljs.org/getting-started/webapp/#installation
- name: install Podman
apt:
name: podman
install_recommends: false
# https://docs.podman.io/en/stable/markdown/podman-auto-update.1.html
- name: disable Podman's auto-update service to improve the boot time
systemd_service:
name: podman-auto-update
enabled: false
# https://docs.podman.io/en/stable/markdown/podman-restart.1.html
- name: disable Podman's restart service to improve the boot time
systemd_service:
name: podman-restart
enabled: false
# Not installing Pulumi because it has no .deb/Snap package(s)[1]
#
# [1]: https://www.pulumi.com/docs/install/
- name: install R
apt:
name: r-base
install_recommends: false
- name: install skopeo
apt:
name: skopeo
install_recommends: false
- name: install Sphinx Open Source Search Server
apt:
name: sphinxsearch
install_recommends: false
- name: install Subversion
apt:
name: subversion
install_recommends: false
- name: install Terraform
apt:
name: terraform
install_recommends: false
# Not installing yamllint[1] because it doesn't seem to be very popular
# and can be easily installed via pip.
#
# [1]: https://github.com/adrienverge/yamllint
- name: install yq
snap:
name: yq
- name: install zstd
apt:
name: zstd
install_recommends: false
# Not installing Alibaba Cloud CLI because it has no .deb/Snap package(s)[1]
#
# [1]: https://www.alibabacloud.com/help/en/alibaba-cloud-cli/latest/linux
- name: install AWS CLI
snap:
name: aws-cli
classic: true
- name: install AWS CLI Session Manager plugin
when: ansible_architecture == "aarch64"
apt:
deb: "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_arm64/session-manager-plugin.deb"
install_recommends: false
- name: install AWS CLI Session Manager plugin
when: ansible_architecture == "x86_64"
apt:
deb: "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb"
install_recommends: false
# Not installing the AWS SAM CLI because it has no .deb/Snap package(s)[1]
#
# [1]: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html
- name: add Microsoft key
apt_key:
id: BC528686B50D79E339D3721CEB3E94ADBE1229CF
url: "https://packages.microsoft.com/keys/microsoft.asc"
keyring: /etc/apt/trusted.gpg.d/microsoft.gpg
- name: add Microsoft repository for Azure CLI
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ jammy main"
filename: microsoft-azure-cli
- name: install Azure CLI
apt:
name: azure-cli
install_recommends: false
# Not installing Azure DevOps CLI because it seems that
# it can be easily enabled through the Azure CLI itself
- name: add GitHub CLI key
apt_key:
id: 2C6106201985B60E6C7AC87323F3D4EA75716059
url: "https://cli.github.com/packages/githubcli-archive-keyring.gpg"
keyring: /etc/apt/trusted.gpg.d/github-cli.gpg
- name: add GitHub CLI repository
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/github-cli.gpg] https://cli.github.com/packages stable main"
filename: github-cli
- name: install GitHub CLI
apt:
name: gh
install_recommends: false
- name: install Google Cloud CLI
snap:
name: google-cloud-cli
classic: true
# Not installing the Netlify CLI because it can be easily installed via npm[1]
#
# [1]: https://docs.netlify.com/cli/get-started/
# Not installing the OpenShift CLI because it has no .deb/Snap package(s)[1]
#
# [1]: https://docs.openshift.com/container-platform/4.14/cli_reference/openshift_cli/getting-started-cli.html
# Not installing ORAS because its Snap package seems to be lagging behind GitHub releases
# and was published by an individual person, which is somewhat suspicious[1]
#
# [1]: https://oras.land/docs/installation#snap
# Not installing Vercel CLI because it can be easily installed via npm
# Java[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#java
- name: install Java
apt:
name: openjdk-19-jdk-headless
install_recommends: false
# PHP Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#php-tools
- name: install PHP
apt:
name: php
install_recommends: false
# https://www.wikieduonline.com/wiki/Phpsessionclean.service_(systemd_service)
- name: disable PHP's session clean service by default to improve the boot time
systemd_service:
name: phpsessionclean
enabled: false
# Not installing Composer because it has no .deb/Snap package(s)[1]
#
# [1]: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos
# Not installing PHPUnit because it can be easily installed via Composer[1]
#
# [1]: https://docs.phpunit.de/en/9.6/installation.html
# Haskell Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#haskell-tools
# Not installing anything Haskell-related because let's wait for someone to ask for this.
# Rust Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#rust-tools
# Not installing anything Rust-related because the Rustup team
# has completely neglected the packaging part of the whole story[1][2].
#
# Installing Rust from the official Ubuntu is kinda meh, because
# the version is always lagging behind the Rustup's one.
#
# [1]: https://github.com/rust-lang/rustup/issues/800
# [2]: https://github.com/rust-lang/rustup/issues/1144
# Browsers and Drivers[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#browsers-and-drivers
- name: fetch the latest Chrome and ChromeDriver download URLs
uri:
url: https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json
return_content: yes
register: chromelabs_json
when: ansible_architecture == "x86_64"
- name: install Chrome
unarchive:
src: "{{ chromelabs_json.json | community.general.json_query('channels.Stable.downloads.chrome[?platform==`linux64`].url | [0]') }}"
remote_src: yes
dest: /opt
when: ansible_architecture == "x86_64"
- name: install ChromeDriver
unarchive:
src: "{{ chromelabs_json.json | community.general.json_query('channels.Stable.downloads.chromedriver[?platform==`linux64`].url | [0]') }}"
remote_src: yes
dest: /opt
when: ansible_architecture == "x86_64"
- copy:
content: |
export PATH="$PATH:/opt/chrome-linux64:/opt/chromedriver-linux64"
dest: /etc/profile.d/cirruslabs-chrome.sh
mode: a+x
when: ansible_architecture == "x86_64"
# .NET Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#net-tools
# Not installing anything .NET-related.
# Databases[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#databases
- name: install SQLite
apt:
name:
- sqlite3
- libsqlite3-dev
install_recommends: false
# Not installing PostgreSQL, MySQL and MS SQL because no one had asked us to.
# Cached Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#cached-tools
# Not caching any tools.
# PowerShell Tools[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#powershell-tools
# Not installing any PowerShell-related tools until someone asks us to.
# Web Servers[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#web-servers
# Not installing any web-servers.
# Android[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#android
- file:
path: /opt/android-sdk
owner: admin
group: admin
state: directory
when: ansible_architecture == "x86_64"
- copy:
content: |
export PATH="$PATH:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/emulator"
export ANDROID_HOME="/opt/android-sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
dest: /etc/profile.d/cirruslabs-android.sh
mode: a+x
- file:
path: /opt/android-sdk/cmdline-tools
owner: admin
group: admin
state: directory
when: ansible_architecture == "x86_64"
- uri:
url: https://dl.google.com/android/repository/repository2-1.xml
return_content: yes
register: android_repository_xml
- apt:
name: python3-lxml
install_recommends: false
- xml:
xmlstring: "{{ android_repository_xml.content }}"
xpath: '//remotePackage[@path="cmdline-tools;latest"][channelRef/@ref="channel-0"]/archives/archive[host-os="linux"]/complete/url'
content: text
register: cmdline_tools_url
- xml:
xmlstring: "{{ android_repository_xml.content }}"
xpath: //remotePackage[@path and starts-with(@path, 'platforms;android-') and channelRef[@ref='channel-0']]
content: attribute
register: platforms_android_packages
- name: Print platforms_android_packages (for debugging)
debug:
var: platforms_android_packages
- name: Get the latest Android platforms version
set_fact:
latest_platforms_android_version: "{{ platforms_android_packages.matches | map(attribute='remotePackage') | map(attribute='path') | map('regex_replace', '^platforms;android-(.+)$', '\\1') | select('regex', '^\\d+(\\.\\d+)*$') | community.general.version_sort | last }}"
- name: Print latest_platforms_android_version (for debugging)
debug:
var: latest_platforms_android_version
- xml:
xmlstring: "{{ android_repository_xml.content }}"
xpath: //remotePackage[@path and starts-with(@path, 'build-tools;') and channelRef[@ref='channel-0']]
content: attribute
register: build_tools_packages
- name: Print build_tools_packages (for debugging)
debug:
var: build_tools_packages
- name: Get the latest Android build tools version
set_fact:
latest_build_tools_version: "{{ build_tools_packages.matches | map(attribute='remotePackage') | map(attribute='path') | map('regex_replace', '^build-tools;(.+)$', '\\1') | select('regex', '^\\d+(\\.\\d+)*$') | community.general.version_sort | last }}"
- name: Print latest_build_tools_version (for debugging)
debug:
var: latest_build_tools_version
- unarchive:
src: "https://dl.google.com/android/repository/{{ cmdline_tools_url.matches[0]['url'] }}"
remote_src: yes
dest: /opt/android-sdk/cmdline-tools
become: no
when: ansible_architecture == "x86_64"
- command: mv /opt/android-sdk/cmdline-tools/cmdline-tools /opt/android-sdk/cmdline-tools/latest
become: no
when: ansible_architecture == "x86_64"
- shell: yes | /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
become: no
when: ansible_architecture == "x86_64"
- command: /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --install "{{ item }}"
with_items:
- "platform-tools"
- "emulator"
- "platforms;android-{{ latest_platforms_android_version }}"
- "build-tools;{{ latest_build_tools_version }}"
become: no
when: ansible_architecture == "x86_64"
# Cached Docker images[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#cached-docker-images
# Not caching any Docker images.
# Installed apt packages[1]
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#cached-docker-images
- apt:
name:
- acl
- aria2
- autoconf
- automake
- binutils
- bison
- brotli
- bzip2
- coreutils
- curl
- dbus
- dnsutils
- dpkg
- dpkg-dev
- fakeroot
- file
- findutils
- flex
- fonts-noto-color-emoji
- ftp
- gcc
- gnupg2
- imagemagick
- iproute2
- iputils-ping
- libc++-dev
- libc++abi-dev
- libc6-dev
- libcurl4
- libgbm-dev
- libgconf-2-4
- libgsl-dev
- libgtk-3-0
- libmagic-dev
- libmagickcore-dev
- libmagickwand-dev
- libsecret-1-dev
- libssl-dev
- libtool
- libunwind8
- libxkbfile-dev
- libxss1
- libyaml-dev
- locales
- lz4
- m4
- make
- net-tools
- netcat
- openssh-client
- p7zip-full
- p7zip-rar
- parallel
- pass
- patchelf
- pigz
- pkg-config
- pollinate
- python-is-python3
- rpm
- rsync
- shellcheck
- ssh
- sshpass
- sudo
- swig
- tar
- telnet
- texinfo
- time
- tk
- tzdata
- unzip
- upx
- wget
- xorriso
- xvfb
- xz-utils
- zip
- zsync
install_recommends: false