ansible-role-k8s-ci/tasks/main.yml
Adrien 9bf8b4e004
All checks were successful
continuous-integration/drone/push Build is passing
WIP on drone server
2020-06-22 00:07:57 +02:00

67 lines
No EOL
2 KiB
YAML

- name: Drone setup
block:
- name: Configure environnement
k8s:
state: present
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('template', item) | from_yaml }}"
with_items:
- drone-Namespace.yaml.j2
tags:
# - drone
- drone-server
- drone-runner
- name: Drone Server install
block:
- name: Install Drone dynamic files
k8s:
state: present
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('template', item) | from_yaml }}"
with_items:
- drone/drone-PersistentVolumeClaim.yaml
- drone/drone-Secret.yaml.j2
- name: Install Drone Static files
k8s:
state: present
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('file', item) | from_yaml }}"
with_items:
- drone/drone-ConfigMap.yaml
- drone/drone-Deployment.yaml
- drone/drone-Service.yaml
tags:
- drone-server
- name: Drone Runner install
block:
- name: Install Drone Runner dynamic files
k8s:
state: present
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('template', item) | from_yaml }}"
with_items:
- drone-runner/drone-runner-Secret.yaml.j2
- name: Install Drone Runner static files
k8s:
state: present
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('file', item) | from_yaml }}"
with_items:
- drone-runner/drone-runner-Namespace.yaml
- drone-runner/drone-runner-ServiceAccount.yaml
- drone-runner/drone-runner-Role.yaml
- drone-runner/drone-runner-RoleBinding.yaml
- drone-runner/drone-runner-ConfigMap.yaml
- drone-runner/drone-runner-Service.yaml
- drone-runner/drone-runner.yaml
tags:
- drone-runner
tags:
- drone