adds sdk_root parameter

This commit is contained in:
Stanislav Shamilov
2024-12-06 20:45:08 +02:00
parent de6f740af8
commit 97b07eebba
3 changed files with 31 additions and 6 deletions

View File

@@ -57,6 +57,27 @@
state: latest
register: platform_tools_updated
- name: Create new sdk root
file:
path: "{{ ansible_env.HOME }}/newroot"
state: directory
register: newroot
- name: Accept licenses in the new root
shell: "yes | sdkmanager --sdk_root={{ newroot.path }} --licenses"
- name: Install a package to a new root
android_sdk:
name: build-tools;34.0.0
state: present
sdk_root: "{{ newroot.path }}"
register: new_root_package
- name: Check package is installed
stat:
path: "{{ newroot.path }}/build-tools/34.0.0"
register: new_root_package_stat
- name: Run tests
assert:
that:
@@ -66,4 +87,6 @@
- build_tools_deleted.changed
- not build_tools_deleted2.changed
- not platform_tools_present.changed
- platform_tools_updated.changed
- platform_tools_updated.changed
- new_root_package.changed
- new_root_package_stat.stat.exists