From 830a14d0569dd65830de69866466cdf44e27d721 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Feb 2021 14:37:15 +0100 Subject: [PATCH] add Ansible file --- local.yml | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 97 insertions(+), 6 deletions(-) diff --git a/local.yml b/local.yml index 9341771..ef5de43 100644 --- a/local.yml +++ b/local.yml @@ -1,10 +1,101 @@ --- -- host: localhost + +- name: Testing + hosts: localhost connection: local - become: true + become: yes + + vars: + bbpassword: $(openssl rand -base64 12) + osxpassword: $(openssl rand -base64 12) tasks: - - name: install htop - package: - name: - - git + - name: Execute Create User + pacman: update_cache=yes + shell: sudo dsc1 . create Users/buildbot + shell: sudo dscl . -create /Users/buildbot UserShell /bin/bash + shell: sudo dscl . -create /Users/buildbot RealName Buildbot + shell: sudo dscl . -create /Users/buildbot UniqueID 510 + shell: sudo dscl . -create /Users/buildbot PrimaryGroupID 80 + shell: sudo dscl . -create /Users/buildbot NFSHomeDirectory /var/lib/buildbot + shell: sudo dscl . -append /Groups/admin GroupMembership buildbot + shell: sudo createhomedir -u buildbot + + + tasks: + - name: Mac user commands + command: sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUserList -array -add buildbot + command: sudo /usr/bin/dscl . -passwd /Users/buildbot "${osxpassword}" + + command: sudo mkdir -p /var/lib/buildbot/workers + command: sudo chown -R buildbot /var/lib/buildbot + command: echo "User password = ${osxpassword}" + command: sudo -u buildbot -H /usr/local/sbin/setup-buildbot2.sh "$username" "$bbpassword" + pacman: update_cache=yes + + tasks: + - name: Shell command + shell: echo Hello + shell: echo "Buildbot password = ${bbpassword}" + shell: echo "User password = ${osxpassword}" + pacman: update_cache=yes + + + +# osxsetup2 + tasks: + - name: osxsetup2 start + shell: echo "--cacert /usr/local/share/ca/cacert.pem" > ~/.curlrc + + + tasks: + - name: Install homebrew + command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + + + tasks: + - name: chown Buildbot + chown: + src: buildbot + dest: /var/lib/buildbot + + + + tasks: + - name: chown Buildbot + command: sudo chown -R buildbot /var/lib/buildbot + + + tasks: + - name: Install Openssl + command: brew install openssl@1.1 + + + tasks: + - name: Install git + command: brew install git + + + tasks: + - name: chown Buildbot + command: sudo chown -R buildbot /var/lib/buildbot + + + tasks: + - name: Install python3 + command: brew install python@3 + + + tasks: + - name: chown Buildbot + command: sudo chown -R buildbot /var/lib/buildbot + + + tasks: + - name: Install buildbot-worker + command: pip3 install buildbot-worker + + + tasks: + - name: Run Buildbot + command: buildbot-worker create-worker /var/lib/buildbot/workers/default dumb.bitmessage.at "${1}" "${2}"