For RKE v0.2.x and Rancher v2.2.x, see https://gist.github.com/superseb/b14ed3b5535f621ad3d2aa6a4cd6443b
Applicable for:
- RKE v0.1.x
- Rancher v2.0.x
- Rancher v2.1.x
| #!/bin/bash | |
| # Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name | |
| # Needs to be run on the server running `rancher/rancher` container | |
| # Check if jq exists | |
| command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; } | |
| # Check if clustername is given | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 [clustername]" |
For RKE v0.2.x and Rancher v2.2.x, see https://gist.github.com/superseb/b14ed3b5535f621ad3d2aa6a4cd6443b
Applicable for:
Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.
To get started, install pass and generate a keypair.
$ brew install pass
$ gpg --gen-key
$ gpg --list-keys| # The setup command allows filtering facts | |
| # More info: https://docs.ansible.com/ansible/latest/modules/setup_module.html | |
| # inventory_file = path to inventory file (if not normal role layout) | |
| # host_group = group to query. use all for all hosts | |
| ansible -i inventory_file host_group -m setup -a 'filter=ansible_distribution_version' | |
| # For a Ubuntu Bionic Host the distribution facts look like this: | |
| # "ansible_distribution": "Ubuntu", | |
| # "ansible_distribution_file_parsed": true, | |
| # "ansible_distribution_file_path": "/etc/os-release", |
| loki: | |
| persistence: | |
| enabled: true | |
| size: 5Gi | |
| serviceMonitor: | |
| enabled: true | |
| promtail: | |
| enabled: true | |
| extraScrapeConfigs: | |
| - job_name: kubernetes-pods-app |
| # For Windows users# Note: <> denotes changes to be made | |
| #Create a conda environment | |
| conda create --name <environment-name> python=<version:2.7/3.5> | |
| #To create a requirements.txt file: | |
| conda list #Gives you list of packages used for the environment | |
| conda list -e > requirements.txt #Save all the info about packages to your folder |