Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- hosts: windows
remote_user: root
become: yes
tasks:
- name: Copy a single file
ansible.windows.win_copy:
src: C:\jenkins\workspace\project win
dest: C:\jenkins\
10 changes: 10 additions & 0 deletions ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all:
hosts:
windows:
ansible_host: ec2-18-132-47-61.eu-west-2.compute.amazonaws.com
ansible_user: administrator
ansible_password:
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_scheme: https
ansible_winrm_server_cert_validation: ignore
21 changes: 21 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace: ansible
name: windows
version: 1.7.2
readme: README.md
authors:
- Jordan Borean @jborean93
- Matt Davis @nitzmahone
description: |
Ansible collection for core Windows plugins.
license_file: COPYING
tags:
- windows
dependencies: {}
repository: https://github.com/ansible-collections/ansible.windows
documentation: https://github.com/ansible-collections/ansible.windows/tree/main/docs
homepage: https://github.com/ansible-collections/ansible.windows
issues: https://github.com/ansible-collections/ansible.windows/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
build_ignore:
- .vscode
- tests/integration/inventory*
- changelogs/.plugin-cache.yaml
25 changes: 25 additions & 0 deletions win_copy_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

- name: Copy files in windows systems
hosts: windows
gather_facts: false
tasks:
- name: copying existing files to temp
win_copy:
src: C:\jenkins\workspace\project win
dest: C:\Users\Administrator
remote_src: yes
register: C

- name: copying current file to sql server
win_copy:
src: /var/lib/jenkins/workspace/mano/
dest: C:\jenkins\workspace\
remote_dest: True
when: C.win_copy.exists == True
register: S

- name: Remove directory structure
ansible.windows.win_file:
path: C:\Users\Administrator\project win
state: absent
when: S.win_copy.exists == True
10 changes: 10 additions & 0 deletions win_server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all:
hosts:
windows:
ansible_host: ec2-54-163-202-107.compute-1.amazonaws.com
ansible_user: administrator
ansible_password: f9CBDc2*B2w2BqjhxeDByN6o$oilepA&
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_scheme: https
ansible_winrm_server_cert_validation: ignore