Skip to content

Instantly share code, notes, and snippets.

@fabianvf
Created February 22, 2018 17:24
Show Gist options
  • Save fabianvf/c1e31452100518f57b0f4e6eb10b8d68 to your computer and use it in GitHub Desktop.
Save fabianvf/c1e31452100518f57b0f4e6eb10b8d68 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:
containers:
- env: '{{ env if not proxy_passthrough else (env | combine(optional_env)) }}'
- debug: var=containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment