Last active
November 8, 2016 19:13
-
-
Save q231950/647643dbb5f5c40c239a32f16ada0c44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Xcode installation | |
hosts: mac-servers | |
remote_user: xxx | |
vars: | |
- apple_username: "abc" | |
- apple_password: "123" | |
# vars_prompt: | |
# - name: "apple_username" | |
# prompt: "Apple membercenter username?" | |
# private: no | |
# - name: "apple_password" | |
# prompt: "Apple membercenter password?" | |
# private: yes | |
# vars: | |
# session: "" | |
environment: | |
XCODE_INSTALL_USER: "{{apple_username}}" | |
XCODE_INSTALL_PASSWORD: "{{apple_password}}" | |
# FASTLANE_SESSION: "{{session}}" | |
tasks: | |
- name: Check spaceship gem latest version | |
remote_user: xxx | |
become: yes | |
gem: | |
name: spaceship | |
state: latest | |
- name: Check xcode-install gem is installed | |
command: bash -lc "gem install xcode-install" | |
- name: Check xcode-install gem latest version | |
command: bash -lc "xcversion update" | |
register: xcversion_update | |
- debug: | |
msg: "{{ xcversion_update.stdout }}" | |
- name: Gems list | |
command: gem list xcode-install | |
# become_user: xxx | |
register: gem_list | |
- debug: | |
msg: "{{ gem_list.stdout }}" | |
- name: Run xcode-install | |
# become_user: xxx | |
command: bash -lc "xcversion install 8" | |
register: xcode_install | |
- debug: var=xcode_install.stdout_lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment