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: "Log in to OKD" | |
k8s_auth: | |
host: "{{ okd_hostname }}" | |
username: "{{ lookup('hashi_vault', 'secret=secret/user-name:value') }}" | |
password: "{{ lookup('hashi_vault', 'secret=secret/user-password:value') }}" | |
register: k8s_auth_results | |
- name: "Set API key" | |
set_fact: |
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
apiVersion: v1 | |
clusters: | |
- cluster: | |
server: {{okd_hostname}} | |
name: my-cluster | |
contexts: | |
- context: | |
cluster: my-cluster | |
namespace: my-namespace | |
user: my-user |
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
--- | |
some: | |
other: | |
config: value | |
with-some: details |
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/sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
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
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
creationTimestamp: null | |
name: my-configmap | |
data: | |
a-config.yaml: | | |
{{ a_config_path | to_yaml_preserve_order | indent }} | |
bconfig.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
#!/usr/bin/python | |
import oyaml as yaml | |
import os | |
class FilterModule(object): | |
def filters(self): | |
return { | |
'to_yaml_preserve_order': self.to_yaml_preserve_order | |
} |
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
--- | |
foo: | |
bar: | |
baz: qux | |
quux: quuz | |
corge: grault | |
garply: waldo |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: my-configmap | |
data: | |
a-config.yaml: | | |
foo: | |
bar: {baz: qux, quux: quuz} | |
corge: grault | |
garply: waldo |
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: Generate configmap k8s | |
template: src=templates/configmap.yaml dest=.k8s/configmap-output.yaml | |
vars: | |
- a_config_path: "config/a-config.yaml" | |
- b_config_path: "config/b-config.yaml" | |
- name: Apply configmap | |
k8s: | |
state: present |
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
import time | |
from telethon import sync, TelegramClient, events | |
# sample API_ID from https://github.com/telegramdesktop/tdesktop/blob/f98fdeab3fb2ba6f55daf8481595f879729d1b84/Telegram/SourceFiles/config.h#L220 | |
# or use your own | |
api_id = | |
api_hash = '' | |
# fill in your own details here | |
phone = '+yourphone' |
NewerOlder