TP-IaC-Kubernetes/roles/hostpath/tasks/main.yaml

14 lines
311 B
YAML

- name: create data dir on K8s-worker-node2
become: yes
file:
path: /data
state: directory
when: "'K8s-worker-node2' in ansible_facts.hostname"
- name: copy file on K8s-worker-node2
become: yes
copy:
src: index.html
dest: /data/
when: "'K8s-worker-node2' in ansible_facts.hostname"