Skip to content

Instantly share code, notes, and snippets.

@mikesorae
Created September 19, 2014 10:00
Show Gist options
  • Save mikesorae/2f979daf6f00219159d5 to your computer and use it in GitHub Desktop.
Save mikesorae/2f979daf6f00219159d5 to your computer and use it in GitHub Desktop.
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