After creating the
admin user on a new build server, I create the
builder user via the command-line using Ansible.
gitlab-runner is installed via brew and a
launch daemon plist starts the service automatically as the
builder user. Unfortunately,
gitlab-runner hangs when git fetching changes until I manually log-in the
builder user account via Remote Desktop one time and click through the first-time setup of the user account. After the initial login, you can logout, reboot and everything just works after that.
Since I have a workaround of logging in the first-time through the GUI to complete the setup of the
builder user is there a way to get the macOS Mojave to do whatever it does during the first login via the command-line?
For completeness, I'm providing the
<?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>SessionCreate</key><true/> <key>KeepAlive</key><true/> <key>RunAtLoad</key><true/> <key>Disabled</key><false/> <key>Label</key> <string>gitlab-runner</string> <key>UserName</key> <string>builder</string> <key>GroupName</key> <string>staff</string> <key>ProgramArguments</key> <array> <string>/usr/local/opt/gitlab-runner/bin/gitlab-runner</string> <string>run</string> <string>--working-directory</string> <string>/Users/builder</string> <string>--config</string> <string>/Users/builder/.gitlab-runner/config.toml</string> <string>--service</string> <string>gitlab-runner</string> <string>--syslog</string> </array> </dict> </plist>