Files
ansible/central_fs-bootstrap.yml
2024-07-12 12:58:40 +02:00

19 lines
1.1 KiB
YAML

---
- name: Create needed folders for the central file server
hosts: all
tasks:
- name: set folders
ansible.builtin.set_fact:
folders: ['\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Infra\',
'\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Middleware\',
'\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Infra\Configs\',
'\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Infra\Configs\AZ_VMINFO\',
'\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Infra\Configs\PRINTER\',
'\\awe-mps-006.adagility.net\cor$\{{ "%Y%m%d" | strftime( ( ansible_date_time.epoch | int ))}}\Infra\Configs\DHCP\']
- name: create daily folder
ansible.windows.win_file:
path: "{{ item }}"
state: directory
with_items: "{{ folders }}"