Files
community.okd/tests/integration/targets/okd/tasks/openshift.yml
Jeff Geerling 3db69dea2b Issue #1: Initial effort to lift some content out of the Kubernetes collection. (#3)
* Issue #1: Initial effort to lift some content out of the Kubernetes collection.

* Issue #1: Disable integration tests for now, as they're not relevant.
2020-08-05 16:00:19 -05:00

63 lines
1.4 KiB
YAML

---
# OpenShift Resources
- name: Create a project
community.kubernetes.k8s:
name: testing
kind: Project
api_version: v1
apply: no
register: output
- name: show output
debug:
var: output
- name: Create deployment config
community.kubernetes.k8s:
state: present
inline: &dc
apiVersion: v1
kind: DeploymentConfig
metadata:
name: elastic
labels:
app: galaxy
service: elastic
namespace: testing
spec:
template:
metadata:
labels:
app: galaxy
service: elastic
spec:
containers:
- name: elastic
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elastic-volume
command: ['elasticsearch']
image: 'ansible/galaxy-elasticsearch:2.4.6'
volumes:
- name: elastic-volume
persistentVolumeClaim:
claimName: elastic-volume
replicas: 1
strategy:
type: Rolling
register: output
- name: Show output
debug:
var: output
- name: Create deployment config again
community.kubernetes.k8s:
state: present
inline: *dc
register: output
- name: DC creation should be idempotent
assert:
that: not output.changed