Rename variables and set default values

This commit is contained in:
Flavio Percoco 2017-10-19 10:45:39 +02:00
parent a0c4c6771b
commit 9abc12d146
4 changed files with 26 additions and 31 deletions

View File

@ -16,9 +16,9 @@ Role Variables
| Name | Default Value | Description |
|-------------------|---------------------|----------------------|
| `action` | `provision` | List of tasks to run. |
| `core_host` | `https://rhev-i32c-03.mpc.lab.eng.bos.redhat.com:6443` | |
| `kube_context` | `kubernetes-admin@kubernetes` | |
| `config_file` | `/root/.kube/config` | |
| `coe_host` | `https://localhost:8443` | |
| `coe_config_context` | | |
| `coe_config_file` | | |
Dependencies
@ -32,8 +32,3 @@ Example Playbook
- hosts: all
roles:
- tripleo.k8s-mariadb
License
-------
MIT

View File

@ -1,6 +1,6 @@
coe_host: "https://127.0.0.1:8443"
kube_context: "kubernetes-admin@kubernetes"
config_file: "~/.kube/config"
coe_config_context:
coe_config_file:
action: provision
service_name: mariadb

View File

@ -1,25 +1,25 @@
- name: Delete mariadb deployment
- name: Delete mariadb deployment
k8s_v1beta1_stateful_set:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
namespace: "{{namespace}}"
state: absent
namespace: "{{namespace}}"
state: absent
- name: Delete mariadb service
- name: Delete mariadb service
k8s_v1_service:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
namespace: "{{namespace}}"
state: absent
namespace: "{{namespace}}"
state: absent
- name: Delete mariadb configmap
- name: Delete mariadb configmap
k8s_v1_namespace:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
state: absent

View File

@ -2,8 +2,8 @@
ignore_errors: yes
k8s_v1_config_map:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
namespace: "{{namespace}}"
state: present
@ -25,8 +25,8 @@
- name: Create mariadb service
k8s_v1_service:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
namespace: "{{namespace}}"
state: present
@ -80,8 +80,8 @@
- name: Create mariadb deployment
k8s_v1beta1_stateful_set:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb
namespace: "{{namespace}}"
state: present
@ -164,8 +164,8 @@
- name: Create mariadb root secret
k8s_v1_secret:
host: "{{coe_host}}"
context: "{{kube_context}}"
kubeconfig: "{{config_file}}"
context: "{{coe_config_context}}"
kubeconfig: "{{coe_config_file}}"
name: mariadb-root
namespace: "{{namespace}}"
state: present