/
pod.yml
48 lines (46 loc) · 1.25 KB
/
pod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
apiVersion: v1
kind: Pod
metadata:
name: ansible
spec:
containers:
- name: ansible
image: quay.io/philips/ansible:4
command: ["/usr/local/bin/ansible-playbook", "-c", "chroot", "-i", "/etc/ansible/hosts", "/etc/ansible/site.yml"]
# TODO: Create a wrapper that will take check and diff as an environment variable or something
#command: ["/usr/local/bin/ansible-playbook", "-c", "chroot", "-i", "/etc/ansible/hosts", "/etc/ansible/site.yml", "--check", "--diff"]
securityContext:
runAsUser: 0
privileged: true
volumeMounts:
- mountPath: /media/root
name: root
- mountPath: /etc/ansible
name: site
- mountPath: /tmp
name: tmp
volumes:
- name: root
hostPath:
path: /
type: Directory
- name: tmp
emptyDir: {}
- name: site
projected:
sources:
- configMap:
name: ansible
items:
- key: site.yml
path: site.yml
- configMap:
name: ansible
items:
- key: ansible.cfg
path: ansible.cfg
- configMap:
name: ansible
items:
- key: hosts
path: hosts