From e5b2a339ace54399906355b49b11c9bcff7d0e95 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Sat, 5 Oct 2019 23:38:56 +0200 Subject: [PATCH 1/7] Strict Windows Firewall configuration --- README.md | 16 ++++++++++++++++ tasks/one_setup.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eb86efd..12448a9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,22 @@ An Ansible Role to install and update [Veeam](https://www.veeam.com) components (Veeam Backup & Replication / Veeam ONE) on Windows. +## Release Notes + +### Version 0.1 + +- one_setup - Version 0.1 + +- one_update - Version 0.1 + +- vbr_setup - Version 0.1 + +- vbr_update - Version 0.1 + +### Version 0.2 +- one_setup - Version 0.2 + - Strict Windows Firewall configuration (instead of disabling) + ## Requirements none diff --git a/tasks/one_setup.yml b/tasks/one_setup.yml index 54b4b5b..142742e 100644 --- a/tasks/one_setup.yml +++ b/tasks/one_setup.yml @@ -1,12 +1,48 @@ --- # one_setup tasks file for veeam_setup -- name: Pre - Disable firewall for Domain, Public and Private profiles +- name: Pre - Enable firewall win_firewall: - state: disabled + state: enabled profiles: - Domain - Private - Public +- name: Pre - Configure firewall rule "Reporter Console" + win_firewall_rule: + name: VeeamONE_ReporterConsole + localport: 1239 + action: allow + direction: in + protocol: tcp + state: present + enabled: yes +- name: Pre - Configure firewall rule "Business View" + win_firewall_rule: + name: VeeamONE_BusinessView + localport: 1340 + action: allow + direction: in + protocol: tcp + state: present + enabled: yes +- name: Pre - Configure firewall rule "Agent" + win_firewall_rule: + name: VeeamONE_Agent + localport: 2805 + action: allow + direction: in + protocol: tcp + state: present + enabled: yes +- name: Pre - Configure firewall rule "Server SMB" + win_firewall_rule: + name: VeeamONE_ServerSMB + localport: 445 + action: allow + direction: in + protocol: tcp + state: present + enabled: yes - name: Pre - Create Local Veeam ONE Service User win_user: name: "{{ one_username }}" From 900c3054a9b7d441f1ee47f8203f263f200d62c8 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 20:27:09 +0200 Subject: [PATCH 2/7] Rename Task --- tasks/one_setup.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/one_setup.yml b/tasks/one_setup.yml index 142742e..ee745d0 100644 --- a/tasks/one_setup.yml +++ b/tasks/one_setup.yml @@ -86,7 +86,7 @@ state: present include_sub_features: yes include_management_tools: yes -- name: SQL - Install SQL 2016 Express +- name: Pre - Install SQL 2016 Express win_package: path: "{{ one_source }}Redistr\\x64\\SqlExpress\\2016SP1\\SQLEXPR_x64_ENU.exe" product_id: SQL 2016 Express @@ -114,7 +114,6 @@ win_package: path: "{{ one_source }}Reporter\\VeeamONE.Reporter.Server.x64.msi" state: present - # Veean Documentation wrong, VM_VC_SELECTED_TYPE=2 is not default! arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPTEULA=1 VM_RP_SERVICEACCOUNT={{ one_username }} VM_RP_SERVICEPASSWORD={{ one_userpassword }} VM_RP_SQL_SERVER=localhost\\VEEAMSQL2016 VM_RP_SQL_AUTHENTICATION=1 VM_RP_SQL_USER=sa VM_RP_SQL_PASSWORD={{ sql_sapassword }} VM_BACKUP_ADD_LATER=1 VM_VC_SELECTED_TYPE=2" - name: Install ONE Reporter Web UI win_package: From c87480087eae1d2d6a00339c86bec9b6d00c1c26 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 20:55:18 +0200 Subject: [PATCH 3/7] add vbr download task --- defaults/main.yml | 5 +++++ tasks/main.yml | 3 +++ tasks/vbr_download.yml | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tasks/vbr_download.yml diff --git a/defaults/main.yml b/defaults/main.yml index c72782c..833fe38 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,6 +2,7 @@ # defaults file for veeam_setup ## Choose Setup +vbr_download: false vbr_setup: false vbr_update: false one_setup: false @@ -12,6 +13,10 @@ one_username: "svc_one" one_userpassword: "ChangeM3!" one_update_file: "VeeamONE_9.5.4.4587_Update#4a.exe" one_update_id: "Veeam ONE Update 4a" +vbr_url: "https://download2.veeam.com/VeeamBackup&Replication_9.5.4.2615.Update4.iso" +vbr_checksum: "ecc27bbcf49104861566782701dca42375b324b4710e2fa79b5f8068c31c4494" +vbr_destination: "C:\\install\\" +vbr_destination_file: "vbr.iso" vbr_source: "D:\\" vbr_update_file: "veeam_backup_9.5.4.2866.update4b_setup.exe" vbr_update_id: "Veeam VBR Update 4b" diff --git a/tasks/main.yml b/tasks/main.yml index 63a9f7b..276f19a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,8 @@ --- # tasks file for veeam_setup +- include_tasks: vbr_download.yml + when: vbr_download | bool + - include_tasks: vbr_setup.yml when: vbr_setup| bool diff --git a/tasks/vbr_download.yml b/tasks/vbr_download.yml new file mode 100644 index 0000000..6388fb7 --- /dev/null +++ b/tasks/vbr_download.yml @@ -0,0 +1,13 @@ +--- +# vbr_download tasks file for veeam_setup +- name: Create directory + win_file: + path: {{ vbr_destination }} + state: directory +- name: Download VBR Source + win_get_url: + url: {{ vbr_url }} + dest: "{{ vbr_destination }}{{ vbr_destination_file }}" + checksum: {{ vbr_checksum }} + checksum_algorithm: sha256 + force: True \ No newline at end of file From c651667c50676909000a70b0cc925afd671455fb Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 21:22:33 +0200 Subject: [PATCH 4/7] add iso Mount --- README.md | 4 ++++ tasks/vbr_download.yml | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12448a9..a5f122a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ An Ansible Role to install and update [Veeam](https://www.veeam.com) components - one_setup - Version 0.2 - Strict Windows Firewall configuration (instead of disabling) +### Version 0.3 +- vbr_download - Version 0.1 + - Add new Role Task to Download VBR ISO File + ## Requirements none diff --git a/tasks/vbr_download.yml b/tasks/vbr_download.yml index 6388fb7..1e90dde 100644 --- a/tasks/vbr_download.yml +++ b/tasks/vbr_download.yml @@ -1,13 +1,21 @@ --- # vbr_download tasks file for veeam_setup -- name: Create directory +- name: Create download directory win_file: path: {{ vbr_destination }} state: directory -- name: Download VBR Source +- name: Download VBR ISO win_get_url: url: {{ vbr_url }} dest: "{{ vbr_destination }}{{ vbr_destination_file }}" checksum: {{ vbr_checksum }} checksum_algorithm: sha256 - force: True \ No newline at end of file + force: True +- name: Mount VBR ISO + win_disk_image: + image_path: "{{ vbr_destination }}{{ vbr_destination_file }}" + state: present + register: disk_image_out +- name: Set VBR Soure Fact + set_fact: + vbr_source: "{{ disk_image_out.mount_paths[0] }}" \ No newline at end of file From fe9c3973837843995ac63989ef96908bd6b88036 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 21:36:23 +0200 Subject: [PATCH 5/7] fix syntax --- tasks/vbr_download.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/vbr_download.yml b/tasks/vbr_download.yml index 1e90dde..7e0c372 100644 --- a/tasks/vbr_download.yml +++ b/tasks/vbr_download.yml @@ -2,13 +2,13 @@ # vbr_download tasks file for veeam_setup - name: Create download directory win_file: - path: {{ vbr_destination }} + path: "{{ vbr_destination }}" state: directory - name: Download VBR ISO win_get_url: - url: {{ vbr_url }} + url: "{{ vbr_url }}" dest: "{{ vbr_destination }}{{ vbr_destination_file }}" - checksum: {{ vbr_checksum }} + checksum: "{{ vbr_checksum }}" checksum_algorithm: sha256 force: True - name: Mount VBR ISO From 057c985e26e401b586a4bdac702605c0bed59b98 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 21:44:53 +0200 Subject: [PATCH 6/7] update checksum --- defaults/main.yml | 2 +- tasks/vbr_download.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 833fe38..4bddf57 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,7 +14,7 @@ one_userpassword: "ChangeM3!" one_update_file: "VeeamONE_9.5.4.4587_Update#4a.exe" one_update_id: "Veeam ONE Update 4a" vbr_url: "https://download2.veeam.com/VeeamBackup&Replication_9.5.4.2615.Update4.iso" -vbr_checksum: "ecc27bbcf49104861566782701dca42375b324b4710e2fa79b5f8068c31c4494" +vbr_checksum: "8a594cec74059f9929ea765ac5e70a49da6fc93803b567cbb9d74fbb1a49a6cc" vbr_destination: "C:\\install\\" vbr_destination_file: "vbr.iso" vbr_source: "D:\\" diff --git a/tasks/vbr_download.yml b/tasks/vbr_download.yml index 7e0c372..ecb87d6 100644 --- a/tasks/vbr_download.yml +++ b/tasks/vbr_download.yml @@ -10,7 +10,7 @@ dest: "{{ vbr_destination }}{{ vbr_destination_file }}" checksum: "{{ vbr_checksum }}" checksum_algorithm: sha256 - force: True + force: false - name: Mount VBR ISO win_disk_image: image_path: "{{ vbr_destination }}{{ vbr_destination_file }}" From 679bfa313286aaac1788aecd34a1c53519d2e128 Mon Sep 17 00:00:00 2001 From: Markus Kraus Date: Thu, 24 Oct 2019 22:02:40 +0200 Subject: [PATCH 7/7] add New Examples --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5f122a..c7c6ea5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ An Ansible Role to install and update [Veeam](https://www.veeam.com) components ### Version 0.3 - vbr_download - Version 0.1 - - Add new Role Task to Download VBR ISO File + - Add new Role Task to Download and Mount VBR ISO File ## Requirements @@ -35,6 +35,7 @@ Available variables are listed below, along with default values (see `defaults/m # defaults file for veeam_setup ## Choose Setup +vbr_download: false vbr_setup: false vbr_update: false one_setup: false @@ -43,8 +44,12 @@ one_setup: false one_source: "E:\\" one_username: "svc_one" one_userpassword: "ChangeM3!" -one_update_file: "VeeamONE_9.5.4.4587_Update#4a.exe" # Fix Name +one_update_file: "VeeamONE_9.5.4.4587_Update#4a.exe" one_update_id: "Veeam ONE Update 4a" +vbr_url: "https://download2.veeam.com/VeeamBackup&Replication_9.5.4.2615.Update4.iso" +vbr_checksum: "8a594cec74059f9929ea765ac5e70a49da6fc93803b567cbb9d74fbb1a49a6cc" +vbr_destination: "C:\\install\\" +vbr_destination_file: "vbr.iso" vbr_source: "D:\\" vbr_update_file: "veeam_backup_9.5.4.2866.update4b_setup.exe" vbr_update_id: "Veeam VBR Update 4b" @@ -59,13 +64,30 @@ none ## Example Playbook -### Veeam Backup & Replication Setup +### Veeam Backup & Replication Setup with local Download ```yaml - name: Veeam Backup & Replication Community Edition Setup hosts: veeam gather_facts: no vars: + vbr_download: true + vbr_setup: true + vbr_update: true + one_setup: false + one_update: false + roles: + - veeam_setup +``` + +### Veeam Backup & Replication Setup without local Download + +```yaml +- name: Veeam Backup & Replication Community Edition Setup + hosts: veeam + gather_facts: no + vars: + vbr_download: false vbr_setup: true vbr_update: true one_setup: false