veeamhub / veeam-ansible Goto Github PK
View Code? Open in Web Editor NEWSample code for deploying and configuring various Veeam solutions using Ansible.
License: GNU Lesser General Public License v3.0
Sample code for deploying and configuring various Veeam solutions using Ansible.
License: GNU Lesser General Public License v3.0
Update the action already...
Describe the bug
The task is unable to be completed successfully.
"Starting all Veeam services" for installing Veeam
Expected behavior
My playbook fails on TASK [veeamhub.veeam.veeam_vas : Starting all Veeam services].
Desktop (please complete the following information):
Additional context
If I run the exact same play after the fact it has no issues. I'm hoping someone might be able to help me find what is causing this error.
Describe the bug
A clear and concise description of what the bug is.
When attempting to publish the latest version of this project's collection, it errs out:
Publishing collection artifact '/home/runner/work/veeam-ansible/veeam-ansible/veeamhub-veeam-1.3.1.tar.gz' to default https://galaxy.ansible.com/api/
Collection has been published to the Galaxy server default https://galaxy.ansible.com/api/
Waiting until Galaxy import task https://galaxy.ansible.com/api/v2/collection-imports/14054/ has completed
ERROR! Galaxy import process failed: 'requires_ansible' in meta/runtime.yml is mandatory, but no meta/runtime.yml found (Code: None)
Error: Process completed with exit code 1.
Expected behavior
Ansible Collection to publish without error to Ansible Galaxy.
Screenshots
Describe the bug
A GitHub Action is used to deploy the this collection to Ansible Galaxy. This action is currently failing.
Error message shown:
ERROR! Error when finding available api versions from default (https://galaxy.ansible.com/) (HTTP Code: 403, Message: Forbidden)
Expected behavior
Collection should deploy to Ansible Galaxy without error.
Additional context
Given the error message, the GitHub Action most likely needs to be updated.
Is your feature request related to a problem? Please describe.
Currently, the Veeam-Hub ansible module does not allow users to specify their own installation directory during installation, which may cause conflicts with existing software or custom directory structures.
Describe the solution you'd like:
Add a parameter to the Veeam-Hub ansible module that allows users to specify their own installation directory during installation. This will provide greater flexibility and control for users during the installation process.
Describe alternatives you've considered:
The only alternative is to manually install each veeam package and specify the installation directory during installation. However, this defeats the purpose of using an automated tool like ansible.
Additional context:
This feature would be especially useful for users with custom directory structures or existing software that may conflict with the default installation directory.
install_VBR.yml
- name: Checking OS for pending reboots
block:
- name: "Check for pending reboots"
pending_reboot_check:
register: precheck
failed_when: "(precheck.pending_reboot | bool) and (auto_reboot == 'no')"
- name: Handle pending reboots and initiate reboot if necessary
block:
- name: "Reboot if necessary"
ansible.windows.win_reboot:
test_command: 'exit (Get-Service -Name Netlogon).Status -eq "Running"'
retries: 5
delay: 60
until: 'test_command_result.rc == 0'
when: precheck | bool
- name: Display message if pending reboot
debug:
msg: "Pending reboot, Auto reboot set to no"
when: precheck.pending_reboot | bool and auto_reboot == 'no'
Example Playbook :
- name: Veeam Backup & Replication Install
hosts: vbr
tasks:
- include_role:
name: veeamhub.veeam.veeam_vas
tasks_from: vbr_install
vars:
version: "12"
auto_reboot: "yes"
sql_install_username: 'sql_install'
sql_install_password: 'windows_password'
sql_service_username: 'svc_sql'
sql_service_password: 'windows_password'
sql_username: 'postgres'
sql_password: 'linux_password'
Describe the bug
The below playbooks need to be updated to include a pause between the VBR install and applying PostgreSQL performance tuning. As is, this step will most likely fail as the server has just rebooted and Veeam services haven't been started yet.
Expected behavior
Sample playbooks should not fail.
Screenshots
Describe the solution you'd like
Ansible collection for Veeam to support to install/patch/upgrade operations of the Veeam Service Provider Console.
@kbreit-insight You're most likely experiencing a different error. Please check the log specified in the error for more details.
Using the default folder it's: C:\install\logs\BackupServer. log
Looking at your playbook, your source_license
parameter is most likely to blame. It needs to be a fully qualified path.
For example:
source_license: "/root/ansible/license.lic"
Please open a new issue if you require further assistance.
Originally posted by @carceneaux in #43 (comment)
I am trying to understand what this should be when the playbook is run via an execution environment.
Current ansible-lint-action
is deprecated. Need to update version to current.
https://github.com/VeeamHub/veeam-ansible/blob/master/.github/workflows/ansible-lint.yml#L16
Do you plan to expand the functionality of this module?
In addition to installation, I would like to see the possibility of setting up infrastructure components. While have to make do with powershell calls:
- name: Add vCenter
ansible.windows.win_powershell:
script: |
Add-VBRvCenter -Name "vc.domain.local" -User "[email protected]" -Password "" -Description "Mega Lab VC"
- name: Add Windows credentials
ansible.windows.win_powershell:
script: |
Add-VBRCredentials -User ".\Administrator" -Password "Pa$$w0rd11" -Description "Veeam Windows Service Account"
- name: Add Windows server
ansible.windows.win_powershell:
script: |
Add-VBRWinServer -Name 192.168.1.24 -Description "Windows File & VMware Proxy" -Credentials (Get-VBRCredentials -name ".\Administrator") -ErrorAction Stop | Out-Null
- name: Add Windows proxy
ansible.windows.win_powershell:
script: |
Add-VBRViProxy -Server 192.168.1.24
- name: Add Linux credentials
ansible.windows.win_powershell:
script: |
Add-VBRCredentials -type Linux -User "root" -Password "Pa$$w0rd11" -Description "Veeam Linux Service Account"
- name: Add Linux server
ansible.windows.win_powershell:
script: |
Add-VBRLinux -Name 192.168.1.14 -Description "Linux VMware Proxy" -Credentials (Get-VBRCredentials -name "root") -ErrorAction Stop | Out-Null
- name: Add Linux proxy
ansible.windows.win_powershell:
script: |
Add-VBRViLinuxProxy -Server 192.168.1.14
Foce: true is the default, but it means that every time the procedure downloads the entire file. Since it's almost 10GB, this is a huge waste of time in my opinion. In my local clone I edited the line to set force:false, we should consider to have this behavior as the new default.
Hello,
Playbook failed to install Veeam Backup & Replication 12 with 3 modes:
with remote SQL Server
or
with local Postgres
or
with remote Postgres
for example:
env:
Deployed Postgres Server version: 11
Postgres ssl auth: disabled
Pgadmin4 successfully connects to postgres server via 5432 port with below creds
connection string:
Server=bpaveeampostgres.postgres.database.azure.com;Database={your_database};Port=5432;User Id=sa@bpaveeampostgres;Password={your_password};
Veeam Backup & Replication Install with ISO Download and remote PostgreSQL (v12+):
playbook:
I am getting error:
"msg": "unexpected rc from 'C:\Windows\System32\msiexec.exe /i G:\Backup\Server.x64.msi /LV C:\Users\adminuser\AppData\Local\Temp\ansible-moduletmp-133221485716370249-1035159283\msiexec.log /qn /norestart /Lv "C:\install\logs\\BackupServer.log" VBR_SQLSERVER_AUTHENTICATION=1 VBR_LICENSE_FILE="C:\install\vbr-license.lic" VBR_SQLSERVER_ENGINE="1" VBR_SQLSERVER_SERVER="bpaveeampostgres.postgres.database.azure.com" VBR_SQLSERVER_DATABASE="VeeamBackup" VBR_SQLSERVER_USERNAME="sa@bpaveeampostgres" VBR_SQLSERVER_PASSWORD="XXXXXXXXX" ACCEPT_LICENSING_POLICY="1" ACCEPT_REQUIRED_SOFTWARE="1" ACCEPT_THIRDPARTY_LICENSES=1 ACCEPTEULA=YES': see rc, stdout, and stderr for more details",
"rc": 1603,
ps: btw Veeam 11 installed successfully with local SQL Server via playbook with
version: "11"
Is your feature request related to a problem? Please describe.
Veeam ONE v11 install/upgrade does not work currently.
Describe the solution you'd like
Changes need to be made to add this support.
Additional context
Veeam ONE v11 install/upgrade includes updated 3rd party binaries to be installed. The current collection needs to be updated to factor in the differences in the filenames of the binaries.
Good morning,
I can create jobs via the role but how can I personalize the Veeam job, for example modify retention or activate vss?
Thanks you
Describe the bug
When I run the playbook using roles from VeeamHub and used playbook with ISO download and installing community version of veeam and with out ISO download and installing community edition of Veeam Backup and Replication
name: Copy Veeam ISO file to Windows
copy:
src: "/XXXX/VeeamBackup&Replication_12.0.0.1420_20230209.iso"
dest: "C:\Downloads\"
include_role:
name: veeamhub.veeam.veeam_vas
tasks_from: vbr_install
vars:
version: "12"
destination: "C:\Downloads\"
destination_iso_file: "VeeamBackup&Replication_12.0.0.1420_20230209.iso"
sql_install_username: "sql_install"
sql_install_password: "PassW0rd!"
sql_service_username: "svc_sql"
sql_service_password: "PassW0rd!"
sql_username: "sa"
sql_password: "PassW0rd!"
Screenshots
Operating system used for Veeam Installation
Could anyone solve this issue
Is your feature request related to a problem? Please describe.
Pertinent code:
- name: Stopping all Veeam Backup Jobs (Only if VBR installed on same server as EM)
ansible.windows.win_shell: |
if (-Not (Get-Module -ListAvailable -Name Veeam.Backup.PowerShell)){Add-PSSnapin -PassThru VeeamPSSnapIn -ErrorAction Stop | Out-Null}
Get-VBRJob | Stop-VBRJob | Out-Null
# when: software.installed | bool
Pertinent error:
"stderr_lines": [
"Get-VBRJob : Execution environment cannot be initialized to Remote",
"At line:2 char:1",
"+ Get-VBRJob | Stop-VBRJob | Out-Null",
"+ ~~~~~~~~~~",
" + CategoryInfo : NotSpecified: (:) [], Exception",
" + FullyQualifiedErrorId : System.Exception"
],
Describe the solution you'd like
I am not 100% sure if the root cause of this is not having backups enabled, but that's my suspicion.
Describe alternatives you've considered
Make this step optional by creating a parameter to enable or disable it in the group vars.
Additional context
For the time being I added a 'when: false' directive to disable this feature.
This was brought up in #45.
Only MD5 and SHA1 checksums are available on Veeam's website. As such, I need to make the following changes:
Is your feature request related to a problem? Please describe.
Pertinent Code:
- name: Start adhoc EM database backup to default SQL backup location
ansible.windows.win_shell: |
$secureString = ConvertTo-SecureString "{{ sql_password }}" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ("{{ sql_username }}", $secureString)
Backup-SqlDatabase -ServerInstance "{{ sql_instance }}" -Database "{{ sql_database }}" -Credential $credential
no_log: true
Pertinent Error:
PS C:\windows\system32> Backup-SqlDatabase
Backup-SqlDatabase : The term 'Backup-SqlDatabase' is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ Backup-SqlDatabase
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Backup-SqlDatabase:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Describe the solution you'd like
I wonder if perhaps this should be configurable, perhaps there's a way to trigger the backup remotely (we rely on our DBA team to do the backups), or perhaps we can prompt the user to let them know that an SQL backup is advised but not possible with this set of tools?
Describe alternatives you've considered
Making this step configurable with a parameter defined in group_vars.
Additional context
I'm not sure how to trigger this remotely, I will seek advice from the DBA team.
Thank you!
Describe the bug
Ansible 2.10 brought about a major architectural change. Certain common modules and roles that were built-in to previous versions of Ansible are no longer included by default. There are Roles and Modules included in this Ansible collection in this repository that need to be updated to support this new behavior.
Expected behavior
Ansible collection should work in versions 2.9.x and 2.10.x.
Additional context
Collection works fine in 2.9 but needs to be updated to support 2.10.
Atm it seems that you can add alot of vms within.
plugins/modules/veeam_vbr_rest_jobs_manage.py
but is it the veeam api that doesnt support to add a tag from vmware to the backupjob or is it not implmented in the veeam-ansible plugin yet?
Currently, optional VBR plug-ins (see below) are not managed in this Ansible collection.
This is a FR to add support for these items including install/patch/upgrade tasks.
Describe the bug
Attempted to update the collection using community-general-ansible-galaxy-install-module, which doesn't actually handle failures very well. I had previously installed the collection manually without incident, latest being v1.3.2. On researching the failure, it appears there are dependencies that have since been updated.
According to your manifest:
"dependencies": {
"ansible.windows": "1.7.3",
"community.windows": "1.7.0"
Both of those are now at v1.9.0.
We've not yet actually used this collection, but is definitely in scope for us for the future.
Thanks.
To Reproduce
Here's the main update task:
- name: install and update shared collections
community.general.ansible_galaxy_install:
ack_ansible29: yes
type: collection
dest: /srv/ansible/collections
force: yes
requirements_file: /srv/ansible/playbooks/ulcollections.yml
register: installed
If veeamhub.veeam is included in the requirements file, it fails due to unable to satisfy the dependencies.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Receiving the following error sometimes:
non-zero return code
When executing the following Ansible code located in vbr_upgrade.yml:
- name: Ensure Veeam services are running
ansible.windows.win_shell: |
Get-Service veeam* | Start-Service -ErrorAction SilentlyContinue
While I'd expect the ErrorAction
param to negate this behavior, this is not the case. Need to update code to the following to resolve this issue:
- name: Ensure Veeam services are running
ansible.windows.win_shell: |
Get-Service veeam* | Where-Object {$_.Name -ne "VeeamMBPDeploymentService"} | Start-Service
Describe the bug
at the Download_ISO task the playbook is failing with the message The term 'Get-AnsibleWindowsWebRequestSpec' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:51 char:65
Desktop (please complete the following information):
My Ansible version is: 2.9.6
Is your feature request related to a problem? Please describe.
Upgrading from 11 to 11A with the EM and VBR upgrades, encountered the following issues:
Pertinent excerpt:
"msg": "unexpected rc from 'C:\\windows\\System32\\msiexec.exe /i E:\\Catalog\\VeeamBackupCatalog64.msi
Describe the solution you'd like
Detect whether an upgrade to the VeeamBackupCatalog is necessary, and only proceed if it is.
Describe alternatives you've considered
A parameter to enable/disable the installation of the VeeamBackupCatalog in the group vars.
Additional context
I'm not aware of which scenarios I would install VeeamBackupCatalog on my backup server, I will have to refer to the guides to understand why this is an issue. I suspect that the scenario covered here is a smaller deployment where the backup catalog is co-resident with the VBR?
I have an environment I can test this.
Thank you!
- name: Download ISO with Retry (async)
ansible.windows.win_get_url:
url: "{{ iso_url }}"
dest: "{{ destination }}{{ destination_iso_file }}"
checksum: "{{ iso_checksum }}"
checksum_algorithm: sha256
force: true
retries: 3
delay: 10
async: 600
poll: 0
register: win_get_url_out
when: (iso_file_info.matched | int) == 0
- name: Check download task status
async_status:
jid: "{{ win_get_url_out.ansible_job_id }}"
register: job_result
until: job_result.finished
retries: 60
delay: 10
Update the VBR v12 isos to 12.1 or create a new set of vars for 12.1 since there is not a method of simple patching to upgrade from 12 to 12.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.