first commit

This commit is contained in:
root
2024-07-12 12:58:40 +02:00
commit 30fdad3be5
557 changed files with 11142 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
- name: Create directory structure
ansible.windows.win_file:
path: \\awe-mps-006.adagility.net\cor$\{{ansible_date_time.year + ansible_date_time.month + ansible_date_time.day}}\Infra\Configs\DHCP\
state: directory
- name: Run PowerShell script for dhcp config
ansible.windows.win_powershell:
script: |
Export-DhcpServer -computerName {{item}} -File "\\awe-mps-006.adagility.net\cor$\$(get-date -f yyyyMMdd)\Infra\Configs\DHCP\{{item}}.xml"
loop: "{{servers}}"
register: pwsh_output
- name: check if file exists
ansible.windows.win_file:
path: \\awe-mps-006.adagility.net\cor$\{{ansible_date_time.year + ansible_date_time.month + ansible_date_time.day}}\Infra\Configs\DHCP\{{item}}.xml
loop: "{{servers}}"
# Export-DhcpServer -computerName gns-mgt-001 -File "\\awe-mps-006.adagility.net\cor$\Infra\Configs\DHCP\gns-mgt-001-$(get-date -f yyyy-MM-dd).xml"