mycloudrevolution.veeam

Veeam

Rola ta dostarcza moduły Ansible do zarządzania Veeam Backup & Replication.

Wymagania

Moduły Veeam są oparte na poleceniach PowerShell Veeam (Katalog poleceń PowerShell Veeam). Wszystkie moduły są zaprojektowane do uruchamiania na serwerze Veeam Backup & Replication z zainstalowaną konsolą i Snapin PowerShell, bez połączenia zdalnego.

Zmienne Roli

Zmienna, którą można ustawić, zależy od konkretnego używanego modułu.

Zależności

brak

Notatki Wydania

Wersja 0.1

  • veeam_connection_facts - Wersja 0.3

    • Uzyskaj połączenie z serwerem Veeam
    • Uzyskaj repozytoria Veeam
    • Uzyskaj serwery Veeam
    • Uzyskaj poświadczenia Veeam
  • veeam_credential - Wersja 0.2

    • Dodaj poświadczenia Windows, Linux lub standardowe
    • Usuń poświadczenia według ID
  • veeam_server - Wersja 0.2

    • Dodaj serwer VMware ESXi

Wersja 0.2

  • veeam_server - Wersja 0.3
    • Dodaj serwer VMware vCenter

Wersja 0.3

  • veeam_backup - Wersja 0.1
    • Dodaj zadanie kopii zapasowej VMware oparte na tagach

Przykładowy Playbook

Pobierz fakty Veeam

- name: Pobierz wszystkie fakty VBR
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  tasks:
  - name: Pobierz fakty Veeam
    veeam_connection_facts:
    register: my_facts
  - name: Debuguj fakty Veeam
    debug:
        var: my_facts

Dodaj poświadczenia Veeam

- name: Dodaj nowe poświadczenia do serwera VBR
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    query: "veeam_facts.veeam_credentials[?id=='{{ my_cred.id }}']"
    my_password: < Dummy >
  tasks:
  - name: Dodaj poświadczenie
    veeam_credential:
        state: present
        type: windows
        username: Administrator
        password: "{{ my_password }}"
        description: Moje dummy opis
    register: my_cred
  - name: Debuguj poświadczenia Veeam
    debug:
        var: my_cred
  - name: Pobierz fakty Veeam
    veeam_connection_facts:
    register: my_facts
  - name: Debuguj fakty poświadczeń Veeam
    debug:
        var: my_facts  | json_query(query)
  - name: Usuń poświadczenie
    veeam_credential:
        state: absent
        id: "{{ my_cred.id }}"

Dodaj hosta VMware ESXi do serwera VBR

- name: Dodaj hosta ESXi do serwera VBR
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    root_password: < Dummy >
  tasks:
  - name: Dodaj poświadczenie root
    veeam_credential:
        state: present
        type: standard
        username: root
        password: "{{ root_password }}"
        description: "Użytkownik Lab dla samodzielnego hosta"
    register: root_cred
  - name: Debuguj poświadczenie root
    debug:
        var: root_cred
  - name: Dodaj serwer esxi
    veeam_server:
        state: present
        type: esxi
        credential_id: "{{ root_cred.id }}"
        name: 192.168.234.101
    register: esxi_server
  - name: Pobierz fakty Veeam
    veeam_connection_facts:
    register: my_facts
  - name: Debuguj serwery Veeam z faktów
    debug:
        var: my_facts.veeam_facts.veeam_servers

Dodaj serwer VMware vCenter do serwera VBR

- name: Dodaj serwer vCenter do serwera VBR
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    vcenter_password: <Dummy>
  tasks:
  - name: Dodaj poświadczenie vCenter
    veeam_credential:
        state: present
        type: standard
        username: [email protected]
        password: "{{ vcenter_password }}"
        description: "Użytkownik Lab dla serwera vCenter"
    register: vcenter_cred
  - name: Debuguj poświadczenie vCenter
    debug:
        var: vcenter_cred
  - name: Dodaj serwer vCenter
    veeam_server:
        state: present
        type: vcenter
        credential_id: "{{ vcenter_cred.id }}"
        name: 192.168.234.100
    register: vcenter_server
  - name: Pobierz fakty Veeam
    veeam_connection_facts:
    register: my_facts
  - name: Debuguj serwery Veeam z faktów
    debug:
        var: my_facts.veeam_facts.veeam_servers

Dodaj zadanie kopii zapasowej VMware oparte na tagach

- name: Dodaj nowe zadanie kopii zapasowej
  hosts: veeam
  gather_facts: no
  roles:
  - veeam
  vars:
    query: "veeam_facts.veeam_backups[?id=='{{ my_backup.id }}']"
  tasks:
  - name: Utwórz zadanie kopii zapasowej
    veeam_backup:
        state: present
        type: vi
        entity: tag
        tag: "Protection\\\\Default"
        name: BackupJob01
        repository: "Domyślne repozytorium kopii zapasowej"
    register: my_backup
  - name: Pobierz fakty Veeam
    veeam_connection_facts:
    register: my_facts
  - name: Debuguj fakty zadania kopii zapasowej Veeam
    debug:
        var: my_facts | json_query(query)

Licencja

GNU Lesser General Public License v3.0

Informacje o autorze

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

O projekcie

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

Zainstaluj
ansible-galaxy install mycloudrevolution.veeam
Licencja
lgpl-3.0
Pobrania
1.4k
Właściciel