mirror of
https://github.com/openshift/community.okd.git
synced 2026-05-06 21:22:36 +00:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
---
|
|
- name: Converge
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: no
|
|
vars:
|
|
ansible_python_interpreter: '{{ virtualenv_interpreter }}'
|
|
tasks:
|
|
# OpenShift Resources
|
|
- name: Create a project
|
|
community.okd.k8s:
|
|
name: testing
|
|
kind: Project
|
|
api_version: project.openshift.io/v1
|
|
apply: no
|
|
register: output
|
|
|
|
- name: show output
|
|
debug:
|
|
var: output
|
|
|
|
- name: Create deployment config
|
|
community.okd.k8s:
|
|
state: present
|
|
inline: &dc
|
|
apiVersion: v1
|
|
kind: DeploymentConfig
|
|
metadata:
|
|
name: hello-world
|
|
labels:
|
|
app: galaxy
|
|
service: hello-world
|
|
namespace: testing
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: galaxy
|
|
service: hello-world
|
|
spec:
|
|
containers:
|
|
- name: hello-world
|
|
image: python
|
|
command:
|
|
- python
|
|
- '-m'
|
|
- http.server
|
|
env:
|
|
- name: TEST
|
|
value: test
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
wait: yes
|
|
wait_condition:
|
|
type: Available
|
|
status: True
|
|
register: output
|
|
|
|
- name: Show output
|
|
debug:
|
|
var: output
|