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
#!/bin/bash | |
# | |
# Copyright 2016-2019 Martin Goellnitz | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
# Example ssh config file. Usually located in ~/.ssh/config (user) or /etc/ssh/ssh_config (system) | |
# This works on both linux and MacOS | |
# Basic ssh commands converted to ssh/config file format | |
# Simplest format | |
# Run with: "ssh blog" => (equivalent to: "ssh [email protected]" and "ssh -i ~/.ssh/id_rsa -p 22 [email protected]") | |
Host blog |
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
#!/bin/bash | |
set -eu | |
_UID=$(id -u) | |
GID=$(id -g) | |
# give lxd permission to map your user/group id through | |
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root | |
# set up a separate key to make sure we can log in automatically via ssh | |
# with $HOME mounted |
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
--- | |
deployer_user: deploy | |
deployer_group: deploy | |
deployer_groups: ['admin'] | |
deployer_user_ssh_key_file: .ssh/id_rsa | |
deployer_gitlab_api: https://[gitlab-domain]/api/v3/ | |
deployer_gitlab_token: [gitlab-token-for-specific-user] | |
deployer_gitlab_key_title: "{{ ansible_hostname }}_deployer" |