ansible_copyfile - choisungwook/portfolio GitHub Wiki

덮어쓰기

- name: Copy the join command to server location
  copy: 
    src: join-command
    dest: /home/vagrant/join-command.sh
    mode: 0755

파일이 없을때만 복사

- name: Check if Kubernetes has already been initialized.
  stat:
    path: /etc/kubernetes/admin.conf
  register: kubernetes_adminconf

- name: Copy the join command to server location
  copy: 
    src: join-command
    dest: /home/vagrant/join-command.sh
    mode: 0755
  when: not kubernetes_adminconf.stat.exists
⚠️ **GitHub.com Fallback** ⚠️