35 lines
707 B
YAML
35 lines
707 B
YAML
- name: install dep packages
|
|
become: yes
|
|
apt:
|
|
pkg:
|
|
- nfs-common
|
|
update_cache: yes
|
|
|
|
- name:
|
|
file:
|
|
path: /tmp/nfs-server
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: template every yaml.j2 files
|
|
template:
|
|
src: "{{item}}.j2"
|
|
dest: "/tmp/nfs-server/{{item}}"
|
|
with_items:
|
|
- nfs-pv-pvc.yaml
|
|
- nfs-server-deployment-service.yaml
|
|
- nfs-dep-sc.yaml
|
|
|
|
- name: kubectl apply
|
|
shell: |
|
|
kubectl apply -f nfs-pv-pvc.yaml
|
|
# kubectl apply -f nfs-dep-sc.yaml
|
|
# kubectl apply -f nfs-server-deployment-service.yaml
|
|
register: output
|
|
args:
|
|
chdir: /tmp/nfs-server
|
|
|
|
- name: Print return information from the previous task
|
|
debug:
|
|
var: output.stdout
|