install.yaml 887 B

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. # Tinc install from staging area
  3. - name: Install find directories in staging area
  4. find:
  5. paths: [ "staging/{{ inventory_hostname }}" ]
  6. file_type: directory
  7. recurse: yes
  8. register: staging_directories
  9. delegate_to: localhost
  10. - include: install-directory.yaml
  11. vars:
  12. _dir: "{{ item.path }}"
  13. _mode: "{{ item.mode }}"
  14. with_items: "{{ staging_directories.files | list }}"
  15. - name: Install find files in staging area
  16. find:
  17. paths: [ "staging/{{ inventory_hostname }}" ]
  18. file_type: file
  19. recurse: yes
  20. register: staging_files
  21. delegate_to: localhost
  22. - name: Install copy files
  23. copy:
  24. src: "{{ item.path }}"
  25. dest: "{{ item.path | replace('staging/' + inventory_hostname, '', 1) }}"
  26. mode: "{{ item.mode }}"
  27. #owner: "{{ _tinc_owner }}"
  28. #group: "{{ _tinc_group }}"
  29. with_items: "{{ staging_files.files | list }}"
  30. become: yes