Git Product home page Git Product logo

veeam's Introduction

Veeam

This Role ships Ansible modules for the management of Veeam Backup & Replication.

Requirements

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.

Role Variables

The settable variables depend on the individual module used.

Dependencies

none

Release Notes

Version 0.1

  • veeam_connection_facts - Version 0.3

    • Get Veeam Server Connection
    • Get Veeam Repositories
    • Get Veeam Servers
    • Get Veeam Credentials
  • veeam_credential - Version 0.2

    • Add Windows, Linux or Standard Credential
    • Remove Credential by ID
  • veeam_server - Version 0.2

    • Add VMware ESXi Server

Version 0.2

  • veeam_server - Version 0.3
    • Add VMware vCenter Server

Version 0.3

  • veeam_backup - Version 0.1
    • Add VMware Backuo Job based on tags

Example Playbook

Get Veeam Facts

- name: Get all VBR Facts
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  tasks:
  - name: Get Veeam Facts
    veeam_connection_facts:
    register: my_facts
  - name: Debug Veeam Facts
    debug:
        var: my_facts

Add Veeam Credentials

- name: Add new Credentials to VBR Server
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    query: "veeam_facts.veeam_credentials[?id=='{{ my_cred.id }}']"
    my_password: < Dummy >
  tasks:
  - name: Add Credential
    veeam_credential:
        state: present
        type: windows
        username: Administrator
        password: "{{ my_password }}"
        description: My dummy description
    register: my_cred
  - name: Debug Veeam Credentials
    debug:
        var: my_cred
  - name: Get Veeam Facts
    veeam_connection_facts:
    register: my_facts
  - name: Debug Veeam Credential Facts
    debug:
        var: my_facts  | json_query(query)
  - name: Remove Credential
    veeam_credential:
        state: absent
        id: "{{ my_cred.id }}"

Add VMware ESXi Host to VBR Server

- name: Add ESXi Host to VBR Server
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    root_password: < Dummy >
  tasks:
  - name: Add root credential
    veeam_credential:
        state: present
        type: standard
        username: root
        password: "{{ root_password }}"
        description: "Lab User for Standalone Host"
    register: root_cred
  - name: Debug root credential
    debug:
        var: root_cred
  - name: Add esxi server
    veeam_server:
        state: present
        type: esxi
        credential_id: "{{ root_cred.id }}"
        name: 192.168.234.101
    register: esxi_server
  - name: Get Veeam Facts
    veeam_connection_facts:
    register: my_facts
  - name: Debug Veeam Servers from Facts
    debug:
        var: my_facts.veeam_facts.veeam_servers

Add VMware vCenter Server to VBR Server

- name: Add vCenter Server to VBR Server
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    vcenter_password: <Dummy>
  tasks:
  - name: Add vCenter credential
    veeam_credential:
        state: present
        type: standard
        username: [email protected]
        password: "{{ vcenter_password }}"
        description: "Lab User for vCenter Server"
    register: vcenter_cred
  - name: Debug vcenter credential
    debug:
        var: vcenter_cred
  - name: Add vCenter server
    veeam_server:
        state: present
        type: vcenter
        credential_id: "{{ vcenter_cred.id }}"
        name: 192.168.234.100
    register: vcenter_server
  - name: Get Veeam Facts
    veeam_connection_facts:
    register: my_facts
  - name: Debug Veeam Servers from Facts
    debug:
        var: my_facts.veeam_facts.veeam_servers

Add VMware Backup Job based on Tags

- name: Add new Backup Job
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    query: "veeam_facts.veeam_backups[?id=='{{ my_backup.id }}']"
  tasks:
  - name: Create Backup Job
    veeam_backup:
        state: present
        type: vi
        entity: tag
        tag: "Protection\\\\Default"
        name: BackupJob01
        repository: "Default Backup repository"
    register: my_backup
  - name: Get Veeam Facts
    veeam_connection_facts:
    register: my_facts
  - name: Debug Veeam Backup Job Facts
    debug:
        var: my_facts | json_query(query)

License

GNU Lesser General Public License v3.0

Author Information

Markus Kraus @vMarkus_K MY CLOUD-(R)EVOLUTION mycloudrevolution.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.