mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 05:22:39 +00:00
Initial commit
This commit is contained in:
2392
tests/KubeObjHelper.log
Normal file
2392
tests/KubeObjHelper.log
Normal file
File diff suppressed because it is too large
Load Diff
2
tests/ansible.cfg
Normal file
2
tests/ansible.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
[defaults]
|
||||
roles_path=../..
|
||||
1
tests/inventory
Normal file
1
tests/inventory
Normal file
@@ -0,0 +1 @@
|
||||
localhost
|
||||
62
tests/roles/hello-world/tasks/main.yml
Normal file
62
tests/roles/hello-world/tasks/main.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
- name: Create project
|
||||
k8s_v1_project:
|
||||
name: hello
|
||||
display_name: Shiny Foo
|
||||
description: W00T! Bitches
|
||||
debug: yes
|
||||
register: project
|
||||
|
||||
- debug: var=project
|
||||
|
||||
- name: Create service
|
||||
k8s_v1_service:
|
||||
name: hello-service
|
||||
namespace: hello
|
||||
state: present
|
||||
ports:
|
||||
- port: 8080
|
||||
target_port: 8080
|
||||
name: web-tcp
|
||||
selector:
|
||||
app: hello
|
||||
labels:
|
||||
app: hello
|
||||
debug: yes
|
||||
register: service
|
||||
|
||||
- debug: var=service
|
||||
|
||||
- name: Create deployment config
|
||||
k8s_v1_deployment_config:
|
||||
name: hello-depoy
|
||||
namespace: hello
|
||||
state: present
|
||||
debug: yes
|
||||
labels:
|
||||
app: hello
|
||||
spec_template_metadata_name: hello-pod
|
||||
spec_template_metadata_labels:
|
||||
app: hello
|
||||
containers:
|
||||
- name: hello
|
||||
image: openshift/busybox-http-app
|
||||
ports:
|
||||
- container_port: 8080
|
||||
protocol: TCP
|
||||
name: web-8100-tcp
|
||||
replicas: 1
|
||||
selector:
|
||||
app: hello
|
||||
strategy_type: Rolling
|
||||
register: create_deployment
|
||||
|
||||
- debug: var=create_deployment
|
||||
|
||||
- name: Create route
|
||||
k8s_v1_route:
|
||||
name: hello-route
|
||||
namespace: hello
|
||||
host: www.example.com
|
||||
to_kind: Service
|
||||
to_name: hello-service
|
||||
tls_termination: edge
|
||||
1
tests/test.retry
Normal file
1
tests/test.retry
Normal file
@@ -0,0 +1 @@
|
||||
localhost
|
||||
7
tests/test.yml
Normal file
7
tests/test.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- role: ansible-kubernetes-modules
|
||||
install_python_requirements: no
|
||||
- role: hello-world
|
||||
Reference in New Issue
Block a user