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
- name: Load bootargs and install repo for Debian install | |
include_vars: | |
file=group_vars/Debian.yml | |
when: '"Debian" in vm_template' | |
- name: Load bootargs and install repo for Ubuntu install | |
include_vars: | |
file=group_vars/Ubuntu.yml | |
when: '"Ubuntu" in vm_template' |
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
== Rules == | |
On Infrastructure | |
----------------- | |
There is one system, not a collection of systems. | |
The desired state of the system should be a known quantity. | |
The "known quantity" must be machine parseable. | |
The actual state of the system must self-correct to the desired state. | |
The only authoritative source for the actual state of the system is the system. | |
The entire system must be deployable using source media and text files. |
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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: no | |
tasks: | |
- name: Test | |
local_action: shell /usr/local/bin/pwgen -s 14 1 | |
register: password |
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
- hosts: balancers | |
user: root | |
tags: deploy | |
tasks: [ ] | |
- hosts: prod | |
serial: 1 | |
tasks: | |
- name: Upload DB dump to prod |
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
[local] | |
localhost | |
[prod] | |
web01 ansible_ssh_host=xx.xx.xx.xx ansible_ssh_port=2222 ansible_ssh_private_key_file=sshkey | |
web02 ansible_ssh_host=xx.xx.xx.xx ansible_ssh_port=2223 ansible_ssh_private_key_file=sshkey | |
[balancers] | |
lb01 ansible_ssh_host=xx.xx.xx.xx ansible_ssh_private_key_file=sshkey ansible_python_interpreter=/usr/local/bin/python2.7 | |
lb02 ansible_ssh_host=xx.xx.xx.xx ansible_ssh_private_key_file=sshkey ansible_python_interpreter=/usr/local/bin/python2.7 |
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
#### Contents of the preconfiguration file (for stretch) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
#d-i debian-installer/locale string en_US | |
# The values can also be preseeded individually for greater flexibility. | |
d-i debian-installer/language string en | |
d-i debian-installer/country string DK | |
d-i debian-installer/locale string en_DK.UTF-8 | |
# Optionally specify additional locales to be generated. |
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
rke up - config cluster.yaml |
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
for node in 1.2.3.4 1.2.3.4.5; do ssh rancher@$node; done |
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
cd /opt/rke/kubernetes | |
cp ssl/kube-apiserver.pem .tmp/kube-adm.pem | |
cp ssl/kube-apiserver.key .tmp/kube-adm.key |
NewerOlder