Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ansible task for android sdk
export PATH="/opt/android-sdk-linux/tools:${PATH}"
---
- name: Install packages to install android sdk
yum: name={{ item }} state=installed
with_items:
- glibc.i686
- libstdc++.i686
- glibc-devel.i686
- zlib.i686
- zlib-devel.i686
- ncurses-devel.i686
- libX11-devel.i686
- libXrender.i686
- ld-linux.so.2
- name: Install Java
yum: name={{ item }} state=installed
with_items:
- java-1.7.0-openjdk
- java-1.7.0-openjdk-devel
- name: Download sdk tools
get_url: >
url=http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
dest=/opt/android-sdk_r23.0.2-linux.tar.gz
register: sdk_file
- name: Unarchive sdk tools
command: >
tar xzf {{ sdk_file.dest }}
creates=/opt/android-sdk-linux
chdir=/opt
- name: Set envs for android sdk
copy: >
src=android.sh
dest=/etc/profile.d/android.sh
- name: Install Android SDKs
shell: echo y | android update sdk -u -a -t "{{ item }}"
with_items:
- tools
- platform-tools
- build-tools-19.1.0
- android-20
- android-19
- android-18
- android-17
- extra-android-support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment