Skip to content

Instantly share code, notes, and snippets.

@fabianvf
Created February 22, 2018 17:29
Show Gist options
  • Select an option

  • Save fabianvf/a5d059f9b0700efdefb890fd5dba208d to your computer and use it in GitHub Desktop.

Select an option

Save fabianvf/a5d059f9b0700efdefb890fd5dba208d to your computer and use it in GitHub Desktop.
---
- hosts: localhost
connection: local
become: true
gather_facts: false
vars:
proxy_passthrough: false
env:
name: ALBUM_TITLE
value: "title1"
image: docker.io/ansibleplaybookbundle/photo-album-demo-app:latest # replace with your application image
name: demo-app
ports:
- container_port: 8080
protocol: TCP
readiness_probe:
http_get:
path: /
port: 8080
scheme: HTTP
initial_delay_seconds: 5
timeout_seconds: 3
optional_env:
envFrom:
- configMapRef:
name: proxy_config
tasks:
- set_fact:
openshift_v1_deployment_config:
name: demo-app
namespace: 'test'
labels:
app: demo-app
service: demo-app
replicas: 1
selector:
app: demo-app
service: demo-app
spec_template_metadata_labels:
app: demo-app
service: demo-app
strategy_type: Recreate
containers:
- env: '{{ env if not proxy_passthrough else (env | combine(optional_env)) }}'
- debug: var=openshift_v1_deployment_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment