Hi,
I have a requirement where the deployment file has to be copied to a window shared network. Jenkins slave is running on Linux server.
We are developing Ansible Playbook to achieve this.
I need help on below points to develop the playbook-
1. How can i connect to the target server(window network)? We already have WINRM enabled to the server. Please find below the Site.yml file-
Site.yml
---
- name: Copy files to IIS SERVER
hosts: "{{ group }}"
connection: local
vars_files:
- "{{ vars_file }}"
- "{{ vault_file }}"
roles:
- { role: copy_files, tags: ["copy_files"]}
My question here is, what would be the value of "connection" parameter?
Hosts are defined in attached hosts.ini file. Find the attached env directory which has hosts.ini file. This also has Test_components folder which has vars_file(which contains service account which is used to connect to the target server, target path and ansible parameters) and vault file.
I am also attaching playbook(playbook_test_package_deploy) file which contains site.yml and roles.
My other question is regarding the tasks(main.yml files under playbook folder, roles--> Copy_files--> tasks). this main.yml task is responsible to perform copy file operation to the target shared network. What would be the command which would copy the files to shared network?
Suppose below is the server details-
server - test1234p
Do i need to create a mapped drive first for above shared folder location using win command then access the path to copy the files?
Thank you!