From 2cb405e560b78cc13929267a49e9456cb414d793 Mon Sep 17 00:00:00 2001 From: Rajkumar Dhakshinamoorthy Date: Sun, 15 Aug 2021 18:16:47 +1000 Subject: [PATCH 01/21] adding yml --- copy.yml | 8 ++++++++ ec2.yml | 10 ++++++++++ galaxy.yml | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 copy.yml create mode 100644 ec2.yml create mode 100644 galaxy.yml diff --git a/copy.yml b/copy.yml new file mode 100644 index 0000000..c05edcc --- /dev/null +++ b/copy.yml @@ -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\ \ No newline at end of file diff --git a/ec2.yml b/ec2.yml new file mode 100644 index 0000000..fde9b40 --- /dev/null +++ b/ec2.yml @@ -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: ;=$diE8L49LTKCXYJl%g2nJLt9F;.JC% + ansible_port: 5986 + ansible_connection: winrm + ansible_winrm_scheme: https + ansible_winrm_server_cert_validation: ignore \ No newline at end of file diff --git a/galaxy.yml b/galaxy.yml new file mode 100644 index 0000000..000f1f9 --- /dev/null +++ b/galaxy.yml @@ -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 \ No newline at end of file From ad48f57ff3b8f91243e6578d47240eb9864c0c07 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sun, 15 Aug 2021 21:38:13 +1000 Subject: [PATCH 02/21] Update ec2.yml --- ec2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ec2.yml b/ec2.yml index fde9b40..52385ec 100644 --- a/ec2.yml +++ b/ec2.yml @@ -3,8 +3,8 @@ all: windows: ansible_host: ec2-18-132-47-61.eu-west-2.compute.amazonaws.com ansible_user: administrator - ansible_password: ;=$diE8L49LTKCXYJl%g2nJLt9F;.JC% + ansible_password: ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https - ansible_winrm_server_cert_validation: ignore \ No newline at end of file + ansible_winrm_server_cert_validation: ignore From 166a9fe45277f0f5fd46a94c3825fbb2a1e40940 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:56:45 +1000 Subject: [PATCH 03/21] Create win_copy_files.yml --- win_copy_files.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 win_copy_files.yml diff --git a/win_copy_files.yml b/win_copy_files.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/win_copy_files.yml @@ -0,0 +1 @@ + From 22c91f80bb4e51999fc5d5cf87b8ea53bbb03f98 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:57:40 +1000 Subject: [PATCH 04/21] Update win_copy_files.yml --- win_copy_files.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/win_copy_files.yml b/win_copy_files.yml index 8b13789..683af09 100644 --- a/win_copy_files.yml +++ b/win_copy_files.yml @@ -1 +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 From 31fe27bd30b3db75a65fd0247f239a211784a460 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:59:56 +1000 Subject: [PATCH 05/21] Create win_server.yaml --- win_server.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 win_server.yaml diff --git a/win_server.yaml b/win_server.yaml new file mode 100644 index 0000000..5e7bd4f --- /dev/null +++ b/win_server.yaml @@ -0,0 +1,10 @@ +all: + hosts: + windows: + ansible_host: ec2-18-206-45-143.compute-1.amazonaws.com + ansible_user: administrator + ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR + ansible_port: 5986 + ansible_connection: winrm + ansible_winrm_scheme: https + ansible_winrm_server_cert_validation: ignore From 860d126054c0baccbab6e358263bf68d2161d325 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 21:50:45 +1000 Subject: [PATCH 06/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 5e7bd4f..ee8c418 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,7 +1,7 @@ all: hosts: windows: - ansible_host: ec2-18-206-45-143.compute-1.amazonaws.com + ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR ansible_port: 5986 From adbfce5841da55b0bcfda87bce32ff2bdaca574d Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:05:05 +1000 Subject: [PATCH 07/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index ee8c418..6007d90 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator - ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR + ansible_password: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 7d819c0b15ff88421baf67c4ae9df01e93b100fd Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:21:04 +1000 Subject: [PATCH 08/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 6007d90..496768a 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator - ansible_password: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' + ansible_password: "{{ ANSIBLE_PASSWORD }}" ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From caa3b8835d9d94868ec685fddde2b5bb02ec4588 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:24:56 +1000 Subject: [PATCH 09/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 496768a..8f9c243 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator - ansible_password: "{{ ANSIBLE_PASSWORD }}" + ansible_password: {{ lookup("env", "ANSIBLE_PASSWORD") }} ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 288bfa7a225c22d811ead0c3b7d385f9362425c1 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:36:46 +1000 Subject: [PATCH 10/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 8f9c243..ee8c418 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator - ansible_password: {{ lookup("env", "ANSIBLE_PASSWORD") }} + ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From c7a99d091c408522e5a49b2afb441184f670e0f6 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:43:36 +1000 Subject: [PATCH 11/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index ee8c418..47c4d4e 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com ansible_user: administrator - ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR + ansible_password: ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 5b4f5fef1b5818aea721237547d44320ae30ffbe Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:35:39 +1000 Subject: [PATCH 12/21] Update win_server.yaml --- win_server.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index 47c4d4e..dcd0569 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,10 +1,13 @@ -all: - hosts: - windows: - ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com - ansible_user: administrator - ansible_password: - ansible_port: 5986 - ansible_connection: winrm - ansible_winrm_scheme: https - ansible_winrm_server_cert_validation: ignore +--- + - hosts: windows + + vars: + ansible_password: "{{ ansible_password }}" + + tasks: + ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com + ansible_user: administrator + ansible_port: 5986 + ansible_connection: winrm + ansible_winrm_scheme: https + ansible_winrm_server_cert_validation: ignore From 186733ce59f67b19cda5446e1effe569503a1617 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:39:49 +1000 Subject: [PATCH 13/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index dcd0569..b84e4bf 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -5,7 +5,7 @@ ansible_password: "{{ ansible_password }}" tasks: - ansible_host: ec2-18-207-112-5.compute-1.amazonaws.com + ansible_host: ec2-52-3-251-62.compute-1.amazonaws.com ansible_user: administrator ansible_port: 5986 ansible_connection: winrm From bd5aebafb3963ffb65ffcec0d81d9fb0f26ff2f2 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:46:44 +1000 Subject: [PATCH 14/21] Update win_server.yaml --- win_server.yaml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index b84e4bf..1f1551f 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,13 +1,10 @@ ---- - - hosts: windows - - vars: - ansible_password: "{{ ansible_password }}" - - tasks: - ansible_host: ec2-52-3-251-62.compute-1.amazonaws.com - ansible_user: administrator - ansible_port: 5986 - ansible_connection: winrm - ansible_winrm_scheme: https - ansible_winrm_server_cert_validation: ignore +all: + hosts: + windows: + ansible_host: ec2-52-3-251-62.compute-1.amazonaws.com + ansible_user: administrator + ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR + ansible_port: 5986 + ansible_connection: winrm + ansible_winrm_scheme: https + ansible_winrm_server_cert_validation: ignore From efdc56bac703f7484da0a108760abd52a2ae64e3 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:49:13 +1000 Subject: [PATCH 15/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 1f1551f..d6f136e 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-52-3-251-62.compute-1.amazonaws.com ansible_user: administrator - ansible_password: B8Bn9=4.mr=hl!tWXV*P=4hpDzT8;CNR + ansible_password: ansipass ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From bac3056e2a53d94c003f0b1fe49c0a01fd7aea45 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Fri, 27 Aug 2021 23:52:46 +1000 Subject: [PATCH 16/21] Update win_server.yaml --- win_server.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index d6f136e..3b956e8 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,9 +1,9 @@ all: hosts: windows: - ansible_host: ec2-52-3-251-62.compute-1.amazonaws.com + ansible_host: ec2-18-205-161-210.compute-1.amazonaws.com ansible_user: administrator - ansible_password: ansipass + ansible_password: H6l!y;ms3@U$MW=P7KBlx-=;E8X3-.v% ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From c122c6901b9bbcdbf9ea82e69956c387d2b3a9cf Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sat, 28 Aug 2021 00:48:51 +1000 Subject: [PATCH 17/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 3b956e8..e2e3dcf 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-18-205-161-210.compute-1.amazonaws.com ansible_user: administrator - ansible_password: H6l!y;ms3@U$MW=P7KBlx-=;E8X3-.v% + ansible_password: ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 7380aa0d6931f64bce5553116003b32d0ddbddea Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sat, 28 Aug 2021 22:35:41 +1000 Subject: [PATCH 18/21] Update win_server.yaml --- win_server.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index e2e3dcf..e99830c 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,9 +1,9 @@ all: hosts: windows: - ansible_host: ec2-18-205-161-210.compute-1.amazonaws.com + ansible_host: ec2-3-84-141-175.compute-1.amazonaws.com ansible_user: administrator - ansible_password: + ansible_password: =G7-!qlFPMOSaDP(KoJ@5*iA9.5mJXO7 ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 483faf9446b6e14cedf77beb1c26fe82f69cdfde Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sun, 29 Aug 2021 00:44:06 +1000 Subject: [PATCH 19/21] Update win_server.yaml --- win_server.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index e99830c..51cdfa1 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,9 +1,9 @@ all: hosts: windows: - ansible_host: ec2-3-84-141-175.compute-1.amazonaws.com + ansible_host: ec2-3-88-158-22.compute-1.amazonaws.com ansible_user: administrator - ansible_password: =G7-!qlFPMOSaDP(KoJ@5*iA9.5mJXO7 + ansible_password: f9CBDc2*B2w2BqjhxeDByN6o$oilepA& ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From b519f9475562b0c292abec1accb2f45c03439e57 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sun, 29 Aug 2021 14:06:07 +1000 Subject: [PATCH 20/21] Update win_server.yaml --- win_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_server.yaml b/win_server.yaml index 51cdfa1..4243b2a 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -3,7 +3,7 @@ all: windows: ansible_host: ec2-3-88-158-22.compute-1.amazonaws.com ansible_user: administrator - ansible_password: f9CBDc2*B2w2BqjhxeDByN6o$oilepA& + ansible_password: ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https From 7315274f36e3b6e7f72c272eb926ddccb1228c53 Mon Sep 17 00:00:00 2001 From: rajjdevops <65726128+rajjdevops@users.noreply.github.com> Date: Sun, 29 Aug 2021 23:51:37 +1000 Subject: [PATCH 21/21] Update win_server.yaml --- win_server.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win_server.yaml b/win_server.yaml index 4243b2a..a981c6a 100644 --- a/win_server.yaml +++ b/win_server.yaml @@ -1,9 +1,9 @@ all: hosts: windows: - ansible_host: ec2-3-88-158-22.compute-1.amazonaws.com + ansible_host: ec2-54-163-202-107.compute-1.amazonaws.com ansible_user: administrator - ansible_password: + ansible_password: f9CBDc2*B2w2BqjhxeDByN6o$oilepA& ansible_port: 5986 ansible_connection: winrm ansible_winrm_scheme: https