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/env python | |
"""Parses Terraform tfstate to generate Ansible inventory.""" | |
import json | |
import os | |
import yaml | |
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) | |
TERRAFORM_INVENTORY = [] | |
TERRAFORM_ANSIBLE_INVENTORY = ( |
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
--- | |
aci_base_ntp_servers: | |
- 10.1.1.254 | |
aci_base_timezone: p0_UTC | |
aci_tenants: | |
- name: BT-Tenant-1 | |
app_profiles: [] |
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: List | |
items: | |
- apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: weave-net | |
annotations: | |
cloud.weave.works/launcher-info: |- | |
{ |
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
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: flannel | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods |
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
{{ ansible_managed|comment }} | |
{% set _groups = [] %} | |
{% for vm in vms %} | |
{% if vm['groups'] is defined %} | |
{% for _group in vm['groups'] %} | |
{% set _ = _groups.append(_group) %} | |
{% endfor %} | |
{% endif %} | |
{% endfor %} |
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 | |
gather_facts: false | |
become: false | |
# vars: | |
# ansible_python_interpreter: /usr/local/bin/python2 | |
tasks: | |
- name: Managing VMs | |
vmware_guest: | |
annotation: Ansible Provisioned |
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
--- | |
# Defines the vSphere Virtual PortGroup that the VMs should be configured on. | |
vm_network: VSS-VLAN-102 | |
# Defines the vSphere template to use for spinning up VMs | |
vm_template: ubuntu1604-packer-template | |
vms: | |
- name: vm-1 | |
customization: |
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
# Ansible managed | |
global | |
# Remote syslog servers | |
log 10.0.102.102:514 local0 | |
#log-send-hostname | |
daemon | |
chroot /var/lib/haproxy | |
group haproxy | |
maxconn 40000 |
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: test_nodes | |
vars: | |
_docker_version: 17.12.0 | |
tasks: | |
- group: | |
name: docker | |
state: present | |
become: true |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: influxdb | |
namespace: kube-system | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: |