Giter Club home page Giter Club logo

ansible-role-android-sdk's Introduction

Ansible Role: Android SDK

Build Status

An Ansible Role that installs the Android SDK tools, SDK packages and dependencies on Ubuntu and RedHat based OS'.

Requirements

A recent version of Ubuntu.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

android_sdk_download_location: http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz

The location to the Android SDK tools package to be installed.

android_sdk_install_location: /opt

The location on disk where you'd like to SDK to be installed.

ubuntu_dependency_packages:
  - "libncurses5"
  - "libstdc++6"
  - "zlib1g"
  - "imagemagick"
  - "expect"
  - "gradle"
  - "ant"
  - "ccache"
  - "autoconf"
  - "automake"
  - "ant"
  - "ccache"
  - "python-dev"
  - "zlibc"

A list of aptitude installable build dependency packages.

ubuntu_precise_dependency_packages:
  - "libgd2-xpm"
  - "libgphoto2-2"
  - "libsane"
  - "ia32-libs-multiarch"

A list of aptitude installable build dependencies for Ubuntu Precise.

rh_dependency_packages:
  - expect
  - libstdc++.i686
  - mesa-libGL-devel
  - ncurses-libs.i686
  - zlib.i686

A list of yum installable build dependencies for RedHat based OS.

android_sdk_update_path: true

Whether or not the role should update the PATH in /etc/environment with the relevant android SDK locations

android_sdk_base_buildtools_version: 20.0.0

The main build tools version from the SDK to use, mainly useful for PATH updates.

android_sdk_tools_to_install:
  - build-tools-20.0.0
  - build-tools-19.1.0
  - platform-tools
  - tools
  - extra-android-support
  - extra-google-m2repository
  - extra-android-m2repository
android_sdks_to_install:
  - android-21
  - android-20
  - android-19
  - android-18
  - android-17
  - android-16

The actual Android SDK packages to install using the SDK manager.

Example Playbook

- hosts: appbuild
  vars_files:
    - vars/main.yml
  roles:
    - { role: nickpack.android_sdk }

License

BSD

Author Information

This role was created in 2015 by Nick Pack.

Contributors

  • @timdaman - Fixed defect in variable loading
  • @ojechev-broadsoft - OSX Support
  • @rodrigdav - Fixed bare variables that broke 2.2 compatibility
  • @halkeye - Seperated SDK tools, fixed 64bit environment
  • @edunham - Fixed 32bit support
  • @peterjanes - Added RedHat family support
  • @conorsch - Changed conditionals to allow > 14.04 support

ansible-role-android-sdk's People

Contributors

conorsch avatar nickpack avatar taraspos avatar timdaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-role-android-sdk's Issues

Getting error installing dependencies

When I run this against LinuxMint 17 using ansible 2.2.0.0 I get the following error. I was able to get this working by changing the with_items statement in the dependencies play. I will submit a PR with this fix momentarily.

    "failed": true,
    "invocation": {
        "module_args": {
            "allow_unauthenticated": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "force": false,
            "install_recommends": null,
            "name": [
                "ubuntu_dependency_packages"
            ],
            "only_upgrade": false,
            "package": [
                "ubuntu_dependency_packages"
            ],
            "purge": false,
            "state": "latest",
            "update_cache": false,
            "upgrade": null
        },
        "module_name": "apt"
    },
    "item": [
        "ubuntu_dependency_packages"
    ],
    "msg": "No package matching 'ubuntu_dependency_packages' is available"
}```

ERROR! the role 'nickpack.android-sdk' was not found

When running the ansible file I got below error.
ERROR! the role 'nickpack.android-sdk' was not found in /home/test/Downloads/myansibel/ansible-role-android-sdk-master/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/test/Downloads/myansibel/ansible-role-android-sdk-master

The error appears to have been in '/home/test/Downloads/myansibel/ansible-role-android-sdk-master/play.yml': line 7, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

roles:

  • { role: nickpack.android-sdk }
    ^ here

ERROR! the role 'nickpack.android-sdk' was not found in

When I running the ansible file I got below error.

ERROR! the role 'nickpack.android-sdk' was not found in /home/test/Downloads/myansibel/ansible-role-android-sdk-master/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/test/Downloads/myansibel/ansible-role-android-sdk-master

The error appears to have been in '/home/test/Downloads/myansibel/ansible-role-android-sdk-master/play.yml': line 7, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

roles:

  • { role: nickpack.android-sdk }
    ^ here

"Install Android SDKs for applicable releases" is slow, even when no new changes are being made

I've been using this to provision an server and the "Install Android SDKs for applicable releases" step is really slow, even when all of the sdk bits have already been installed.

It looks like the slowness is due to the Android SDK itself, so it might be useful to compute the list of items that are already installed and only run the android sdk command when it is necessary and only with the list of new items.

Varible defaults not loaded

In the following conditions

  • ubuntu 16.04
  • ansible 2.3.2.0
  • installed role from from ansible glaxy

I get the following error
failed: [localhost] (item=/galaxy-roles/nickp666.android-sdk/vars/default.yml) => {"ansible_facts": {}, "failed": true, "item": "/galaxy-roles/nickp666.android-sdk/vars/default.yml", "message": "Unable to find 'Debian.yml' in expected paths."}

It appears the following line is the cause

  include_vars: "{{ansible_os_family}}.yml"
  with_first_found:
    - "{{ ansible_distribution }}.yml"
    - "{{ ansible_os_family }}.yml"
    - "default.yml"

include_vars should be looking for the item from with_first_found:

install stalls on OSX, possible due to permissions?

While running the dependencies task ansible stall forever, with -vvvv I was able to verify it is stuck running homebrew cask install and seems to be waiting for a password...

I'm guessing this would need to be run as sudo?

I mostly use brew and never really used cask but I suppose it would be best not to run as root ofc.

the part where it stalls is:

<x.x.x.xx> ESTABLISH SSH CONNECTION FOR USER: testing
<x.x.x.xx> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=testing -o ConnectTimeout=10 -o ControlPath=/Users/user/.ansible/cp/d46427b07b -tt X.X.X.X '/bin/sh -c '"'"'/usr/bin/python /Users/testing/.ansible/tmp/ansible-tmp-1515540326.55-202654132996978/homebrew_cask.py; rm -rf "/Users/testing/.ansible/tmp/ansible-tmp-1515540326.55-202654132996978/" > /dev/null 2>&1 && sleep 0'"'"''

If I run this in my shell it does ask for a password, unless its the ssh password, but it shouldn't since PasswordAuthentication is set to no, and also everything else passed using the rsa key.

Can't find role on ansbile-galaxy

$ ansible-galaxy install nickpack.android-sdk
- downloading role 'android-sdk', owned by nickpack
 [WARNING]: - nickpack.android-sdk was NOT installed successfully: - sorry, nickpack.android-sdk was not found on https://galaxy.ansible.com

No package matching 'libncurses5:i386' is available error

Hi,

I try use your ansible role in one of my project but I am getting follow error during provisioning (NOTE I am using trusty64 image in vagrant):

TASK: [nickp666.android-sdk | Install build dependencies] ********************* 
failed: [default] => (item=libncurses5:i386,libstdc++6:i386,libgcc1:i386,zlib1g:i386,imagemagick,expect,ant,ccache,autoconf,automake,python-dev,zlibc,android-tools-adb) => {"failed": true, "item": "libncurses5:i386,libstdc++6:i386,libgcc1:i386,zlib1g:i386,imagemagick,expect,ant,ccache,autoconf,automake,python-dev,zlibc,android-tools-adb"}
msg: No package matching 'libncurses5:i386' is available

FATAL: all hosts have already failed -- aborting

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.