Files
2024-12-12 11:53:34 +07:00

26 lines
653 B
YAML

# Kiểm tra kết nối Nexus
- name: Check Nexus connectivity
uri:
url: "{{ nexus_url }}"
method: GET
return_content: yes
status_code: 200
register: nexus_response
- name: Verify Nexus response
fail:
msg: "Unable to connect to Nexus at {{ nexus_url }}"
when: nexus_response.status != 200
# Kiểm tra quyền ghi trên thư mục target
- name: Verify write access to target path
win_acl:
path: "{{ target_path }}"
state: query
register: acl_status
- name: Ensure target path is writable
fail:
msg: "No write permissions for target path: {{ target_path }}"
when: acl_status.permissions | length == 0