-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
George Adams
committed
Nov 20, 2017
1 parent
326ca9d
commit af48068
Showing
17 changed files
with
271 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Manual steps required to run ansible on machines | ||
|
||
## macOS | ||
1. Update Sudoers file: | ||
|
||
this requires `NOPASSWD` to be added to the sudoers file to enable elevation | ||
|
||
`sudo visudo` | ||
and change: | ||
`%admin ALL = (ALL) ALL` | ||
to | ||
`%admin ALL = (ALL) NOPASSWD:ALL` | ||
|
||
2. Allow ssh access | ||
|
||
```bash | ||
sudo systemsetup -setremotelogin on | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
yes | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}') | ||
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress" | ||
|
||
# Installing the latest Xcode command line tools on 10.9.x or higher | ||
|
||
if [[ "$osx_vers" -ge 9 ]]; then | ||
touch "$cmd_line_tools_temp_file"; | ||
PROD=$(softwareupdate -l | | ||
grep "\*.*Command Line" | | ||
head -n 1 | awk -F"*" '{print $2}' | | ||
sed -e 's/^ *//' | | ||
tr -d '\n') | ||
softwareupdate -i "$PROD"; | ||
fi | ||
|
||
# Installing the latest Xcode command line tools on 10.7.x and 10.8.x | ||
|
||
# on 10.7/10.8, instead of using the software update feed, the command line tools are downloaded | ||
# instead from public download URLs, which can be found in the dvtdownloadableindex: | ||
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex | ||
|
||
if [[ "$osx_vers" -eq 7 ]] || [[ "$osx_vers" -eq 8 ]]; then | ||
|
||
if [[ "$osx_vers" -eq 7 ]]; then | ||
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg | ||
fi | ||
|
||
if [[ "$osx_vers" -eq 8 ]]; then | ||
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_osx_mountain_lion_april_2014.dmg | ||
fi | ||
|
||
TOOLS=cltools.dmg | ||
curl "$DMGURL" -o "$TOOLS" | ||
TMPMOUNT=`/usr/bin/mktemp -d /tmp/clitools.XXXX` | ||
hdiutil attach "$TOOLS" -mountpoint "$TMPMOUNT" -nobrowse | ||
# The "-allowUntrusted" flag has been added to the installer | ||
# command to accomodate for now-expired certificates used | ||
# to sign the downloaded command line tools. | ||
installer -allowUntrusted -pkg "$(find $TMPMOUNT -name '*.mpkg')" -target / | ||
hdiutil detach "$TMPMOUNT" | ||
rm -rf "$TMPMOUNT" | ||
rm "$TOOLS" | ||
fi |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
# | ||
|
||
- name: restart sshd | ||
when: not os|startswith("macos") | ||
service: name="{{ sshd_service_name }}" state=restarted |
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
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
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
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
10 changes: 10 additions & 0 deletions
10
ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
|
||
# | ||
# macos: python2.7 | ||
# | ||
|
||
- name: install pip | ||
pip: | ||
name: tap2junit | ||
executable: /usr/local/bin/pip2 |
29 changes: 29 additions & 0 deletions
29
ansible/roles/jenkins-worker/templates/org.nodejs.osx.jenkins.plist
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Label</key> | ||
<string>org.nodejs.osx.jenkins</string> | ||
|
||
<key>UserName</key> | ||
<string>iojs</string> | ||
|
||
<key>WorkingDirectory</key> | ||
<string>/Users/iojs</string> | ||
|
||
<key>Program</key> | ||
<string>/Users/iojs/start.sh</string> | ||
|
||
<key>RunAtLoad</key> | ||
<true/> | ||
|
||
<key>KeepAlive</key> | ||
<true/> | ||
|
||
<key>StandardErrorPath</key> | ||
<string>/Users/iojs/jenkins_err.log</string> | ||
|
||
<key>StandardOutPath</key> | ||
<string>/Users/iojs/jenkins.log</string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.