X2
5 years agoModerator
Start/stop NetBackup with Ansible
Calling on Ansible experts:
I created an Ansible playbook to "standardize" our Linux client NetBackup configuration after initial install. The configuration steps work fine except that I'm having difficulties to shutdown/startup of NetBackup. Below the is part of playbook which I use:
- name: Stop NetBackup service: name: netbackup state: stopped
...
- name: Start NetBackup service: name: netbackup state: started
I have also tried by adding a 30 second pause after this task but it didn't help.
Below is the Anisible's warning for shutdown of NetBackup
TASK [Stop NetBackup] ********************************************************** [WARNING]: The service (netbackup) is actually an init script but the system is managed by systemd
and for startup:
TASK [Start NetBackup] ********************************************************* fatal: [orford.it.mcgill.ca]: FAILED! => {"changed": false, "msg": "Unable to start service netbackup: Failed to start netbackup.service: Unit not found.\n"}
Any suggestions?
vtas_chas apologies for the late reply. No infoscale on the client. These are standard VMs on vSphere without Infoscale. I haven't tried this on our Solaris servers but they are provisioned so rarely!
As a workaround, I ended up using sysvinit module rather than service or systemd.
- name: Stop NetBackup (initd) sysvinit: name: netbackup state: stopped