Skip to content

Instantly share code, notes, and snippets.

View colin-mccarthy's full-sized avatar
🏠
Working from home

Colin McCarthy colin-mccarthy

🏠
Working from home
View GitHub Profile
@colin-mccarthy
colin-mccarthy / tower-namespace.yaml
Last active October 19, 2020 19:04
OpenShift namespace for Ansible Tower Container Groups
apiVersion: v1
kind: Namespace
metadata:
name: ansible-tower
@colin-mccarthy
colin-mccarthy / role-binding.yaml
Last active October 20, 2020 01:28
OpenShift role binding for Ansible Container Groups
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ansible-tower
namespace: ansible-tower
subjects:
- kind: ServiceAccount
name: tower
namespace: ansible-tower
roleRef:
@colin-mccarthy
colin-mccarthy / service-account.yaml
Last active October 20, 2020 01:25
Service Account on OpenShift for Ansible Tower Container Groups
apiVersion: v1
kind: ServiceAccount
metadata:
name: tower
namespace: ansible-tower
@colin-mccarthy
colin-mccarthy / pysnow-pod-manifest.yaml
Last active October 19, 2020 18:35
Ansible Container Groups pod manifest with pysnow
apiVersion: v1
kind: Pod
metadata:
namespace: ansible-tower
spec:
containers:
- image: 'quay.io/colin_mccarthy/pysnow_pod:latest'
tty: true
stdin: true
imagePullPolicy: Always
@colin-mccarthy
colin-mccarthy / Dockerfile
Created October 19, 2020 18:23
Ansible Container Group Dockerfile with pysnow
# base Ansible Runner image
FROM quay.io/colin_mccarthy/ansible-runner:stable_1.4.x
# dependencies
RUN pip3 install --no-cache-dir pysnow==0.7.16
@colin-mccarthy
colin-mccarthy / default_pod_manifest.yaml
Created October 19, 2020 18:11
Default pod manifest for Ansible Tower Container Groups
apiVersion: v1
kind: Pod
metadata:
namespace: ansible-tower
spec:
containers:
- image: 'registry.redhat.io/ansible-tower-37/ansible-runner-rhel7'
tty: true
stdin: true
imagePullPolicy: IfNotPresent
@colin-mccarthy
colin-mccarthy / pod-manager-role.yaml
Last active October 20, 2020 01:26
Create a Role named (pod-manager)
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-manager
namespace: ansible-tower
rules:
- verbs:
- get
- list
- watch
- name: Tower Projects
hosts: tower
gather_facts: false
connection: local
collections:
- awx.awx
# organization and state vars are injected via a survey in Ansible Tower.
---
- name: GATHER INFORMATION FROM ROUTERS
hosts: cisco
connection: network_cli
gather_facts: no
tasks:
- name: GATHER ROUTER FACTS
ios_facts:
@colin-mccarthy
colin-mccarthy / k8s-pi.md
Created December 9, 2018 21:09 — forked from alexellis/k8s-pi.md
K8s on Raspbian

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

This is part of a blog post Serverless Kubernetes home-lab with your Raspberry Pis written by Alex Ellis.

Copyright disclaimer: Please provide a link to the post and give attribution to the author if you plan to use this content in your own materials.

Pre-reqs: