This file contains hidden or 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
| # Install | |
| brew install rbenv ruby-build | |
| # List available ruby versions | |
| rbenv -l | |
| # Install the required ruby version | |
| rbenv install 2.4.1 | |
| rbenv global 2.4.1 |
This file contains hidden or 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/sh | |
| # Abort script when command exits with error | |
| set -e | |
| # Print each command before it is executed (only for debugging) | |
| #set -x | |
| ######################################################################## | |
| # Config |
This file contains hidden or 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
| # On systems without ssh-copy-id: | |
| cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'umask 0077; mkdir -p .ssh; cat >> .ssh/authorized_keys && echo "Key copied"' | |
| # Or: | |
| ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@<hostname> |
This file contains hidden or 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
| <VirtualHost 172.4.16.23:80> | |
| DocumentRoot /opt/httpd/vhosts/wp.example.com/htdocs | |
| ServerName wp.example.com | |
| ServerAlias community-new.hintest.ch | |
| ErrorLog /opt/httpd/logs/error.wp.example.com.srv-web01.log | |
| CustomLog /opt/httpd/logs/access.wp.example.com.srv-web01.log combined | |
| # Inherit Rewrite Rules from httpd.conf | |
| RewriteEngine On | |
| RewriteOptions InheritBefore |
This file contains hidden or 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
| # Login to your Docker host | |
| # Print the Docker host's configured DNS servers | |
| nmcli dev show | grep 'IP4.DNS' | |
| # Run the following command in order to check if DNS resolution within the container is working (using one of the DNS servers) | |
| docker run --dns <dns host or ip> busybox nslookup google.com | |
| # In case there are no errors and resolution works, we may apply a system wide fix (adjust the DNS entries as needed): | |
| echo "{ |
This file contains hidden or 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
| # Check if a specific app has been quarantined by Gatekeeper | |
| ➜ ~ xattr Applications/Eclipse.app | |
| com.apple.quarantine | |
| # Remove the app from the quarantine | |
| ➜ ~ sudo xattr -r -d com.apple.quarantine Applications/Eclipse.app |
This file contains hidden or 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: "NRPE config: Update hosts allowed to call the NRPE agent" | |
| replace: | |
| dest: "{{ ansible_nagios_nrpe_config_file }}" | |
| replace: 'allowed_hosts={{ ansible_nagios_nrpe_source_hosts }}' | |
| regexp: 'allowed_hosts=\s*([^\n\r]*)' | |
| notify: | |
| - Restart NRPE agent | |
| - Run NRPE check | |
| - Assert NRPE check was successful |
This file contains hidden or 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
| # Ansible role's default vars | |
| --- | |
| # The NRPE version | |
| ansible_nagios_nrpe_version: "3.0.1" | |
| # Allows to force a re-installation | |
| ansible_nagios_nrpe_reinstall_force: false |
This file contains hidden or 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
| # Create root CA | |
| openssl genrsa -aes256 -out ca-key.pem 4096 | |
| openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem | |
| # Create Server key and CSR | |
| openssl genrsa -out server-key.pem 4096 | |
| openssl req -subj "/CN=docker-node01-dev" -sha256 -new -key server-key.pem -out server.csr | |
| # Create trusted Server Certificate | |
| echo subjectAltName = DNS:docker-node01-dev,IP:192.168.9.70,IP:127.0.0.1 > extfile.cnf |