项目作者: vMarkusK

项目描述 :
My Ansible Playbooks, Roles and Modules for Veeam
高级语言:
项目地址: git://github.com/vMarkusK/Ansible-Veeam.git
创建时间: 2019-06-04T20:40:32Z
项目社区:https://github.com/vMarkusK/Ansible-Veeam

开源协议:GNU Lesser General Public License v3.0

下载


Ansible Veeam Playbooks, Roles and Modules

About

Ansible Veeam

Besides an Ansible Playbook for the unattended installation of Veeam Backup & Replication servers, this repository contains my Ansible modules for the management of Veeam Backup & Replication.

The Veeam modules are based on the Veeam PowerShell cmdlets (Veeam PowerShell Reference). All modules are designed to be executed on a Veeam Veeam Backup & Replication server with installed console and PowerShell Snapin, no remote connection.

Project Owner

Markus Kraus @vMarkus_K

MY CLOUD-(R)EVOLUTION mycloudrevolution.com

Project Content

The Ansible Veeam Modules of this Repository are shipped as a Ansible Role now. The Ansible Veeam Role is a GIT submodule of this Repository and is also published on the Ansible Galaxy.

Installation of the Role:

  1. ansible-galaxy install mycloudrevolution.veeam

To display the documentation of the “non-default” Ansible modules you can use this syntax:

  1. ansible-doc veeam_credential -M /<path to the project root folder>/roles/veeam/library/

Module - veeam_facts

Collect configuration details from your Veeam Backup & Replication Server.

Playbook tasks:

  1. roles:
  2. - veeam
  3. tasks:
  4. - name: Get Veeam Facts
  5. veeam_connection_facts:
  6. register: my_facts
  7. - name: Debug Veeam Facts
  8. debug:
  9. var: my_facts

Return (Example):

  1. ok: [10.0.2.16] => {
  2. "my_facts": {
  3. "changed": false,
  4. "failed": false,
  5. "veeam_facts": {
  6. "veeam_connection": [
  7. {
  8. "port": 9392,
  9. "server": "localhost",
  10. "user": "VEEAM01\\Administrator"
  11. }
  12. ],
  13. "veeam_credentials": [
  14. {
  15. "description": "Lab User for Standalone Host",
  16. "encryptedpassword": null,
  17. "id": "ae0fa0f8-d0ed-4014-9e0c-b84d56bc9084",
  18. "name": "root",
  19. "username": "root"
  20. }
  21. ],
  22. "veeam_repositories": [
  23. {
  24. "description": "Created by Veeam Backup",
  25. "friendlypath": "C:\\Backup",
  26. "host": "Veeam01",
  27. "name": "Default Backup Repository",
  28. "type": "Windows"
  29. }
  30. ],
  31. "veeam_servers": [
  32. {
  33. "description": "Backup server",
  34. "id": "6745a759-2205-4cd2-b172-8ec8f7e60ef8",
  35. "name": "Veeam01",
  36. "type": "Microsoft Windows Server"
  37. },
  38. {
  39. "description": "Created by Powershell at 25.06.2019 22:39:24.",
  40. "id": "aedd0693-657c-4384-9e53-cd6bb605a637",
  41. "name": "192.168.234.101",
  42. "type": "VMware ESXi Server"
  43. }
  44. ]
  45. }
  46. }
  47. }

Module - veeam_credential

Add and remove credentials on your Veeam Backup & Replication Server.

Add, debug and remove credentials

Veeam Add Credentials

  1. roles:
  2. - veeam
  3. tasks:
  4. - name: Add Credential
  5. veeam_credential:
  6. state: present
  7. type: windows
  8. username: Administrator
  9. password: "{{ my_password }}"
  10. description: My dummy description
  11. register: my_cred
  12. - name: Debug Veeam Credentials
  13. debug:
  14. var: my_cred
  15. - name: Get Veeam Facts
  16. veeam_connection_facts:
  17. register: my_facts
  18. - name: Debug Veeam Credential Facts
  19. debug:
  20. var: my_facts | json_query(query)
  21. - name: Remove Credential
  22. veeam_credential:
  23. state: absent
  24. id: "{{ my_cred.id }}"

Module - veeam_server

Add and remove Servers (VMware ESXi, VMware vCenter, etc. ) on your Veeam Backup & Replication Server.

Add VMware ESXi Server

Veeam Add ESXi

  1. roles:
  2. - veeam
  3. tasks:
  4. - name: Add root credential
  5. veeam_credential:
  6. state: present
  7. type: standard
  8. username: root
  9. password: "{{ root_password }}"
  10. description: "Lab User for Standalone Host"
  11. register: root_cred
  12. - name: Debug root credential
  13. debug:
  14. var: root_cred
  15. - name: Add esxi server
  16. veeam_server:
  17. state: present
  18. type: esxi
  19. credential_id: "{{ root_cred.id }}"
  20. name: 192.168.1.10
  21. register: esxi_server
  22. - name: Get Veeam Facts
  23. veeam_connection_facts:
  24. register: my_facts
  25. - name: Debug Veeam Servers from Facts
  26. debug:
  27. var: my_facts.veeam_facts.veeam_servers

Add VMware vCenter Server

Veeam Add vCenter

  1. roles:
  2. - veeam
  3. tasks:
  4. - name: Add vCenter credential
  5. veeam_credential:
  6. state: present
  7. type: standard
  8. username: Administrator@vSphere.local
  9. password: "{{ vcenter_password }}"
  10. description: "Lab User for vCenter Server"
  11. register: vcenter_cred
  12. - name: Debug vcenter credential
  13. debug:
  14. var: vcenter_cred
  15. - name: Add vCenter server
  16. veeam_server:
  17. state: present
  18. type: vcenter
  19. credential_id: "{{ vcenter_cred.id }}"
  20. name: 192.168.234.100
  21. register: vcenter_server
  22. - name: Get Veeam Facts
  23. veeam_connection_facts:
  24. register: my_facts
  25. - name: Debug Veeam Servers from Facts
  26. debug:
  27. var: my_facts.veeam_facts.veeam_servers

Module - veeam_backup

Add and remove Veeam Backup Jobs (Based on various entities).

Add VMware Backup Job Based on Tags

Veeam Add Tag Backup

Playbook - Veeam_setup.yml

Install Veeam Backup & Replication 9.5 Update 4a in the unattended mode with Ansible.

Test / Dev Environment:

  • Ansible 2.8
  • CentOS 7
  • Windows Server 2019

    Veeam Setup

Playbook - Veeam_get_facts.yml

Playbook for gather Veeam Backup & Replication facts.

Test / Dev Environment:

  • Ansible 2.8
  • CentOS 7
  • Windows Server 2019
  • Veeam Backup & Replication 9.5 Update 4a

Playbook - Veeam_add_esxi.yml

Playbook to add a new VMware ESXi Server to the Veeam Backup & Replication server.

Test / Dev Environment:

  • Ansible 2.8
  • CentOS 7
  • Windows Server 2019
  • Veeam Backup & Replication 9.5 Update 4a
  • VMware ESXi 6.7 Update 1

    Playbook - Veeam_add_vcenter.yml

Playbook to add a new VMware vCenter Server to the Veeam Backup & Replication server.

Test / Dev Environment:

  • Ansible 2.8
  • CentOS 7
  • Windows Server 2019
  • Veeam Backup & Replication 9.5 Update 4a
  • VMware vCenter 6.7 Update 1

Playbook - Veeam_add_cred.yml

Playbook to add and remove new credentials to the Veeam Backup & Replication server.

Test / Dev Environment:

  • Ansible 2.8
  • CentOS 7
  • Windows Server 2019
  • Veeam Backup & Replication 9.5 Update 4a