Thienvv - first commit - ansible
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user