【发布时间】:2015-03-13 20:05:39
【问题描述】:
我正在 AIX 上进行新的 opsware 代理服务检查,它的代理路径是 /etc/rc.d/init.d/opsware-agent。
首先请告诉我如何定义这个变量路径并调用服务。
其次,仅当此 opsware 代理服务已重新启动时,它才应运行该命令。怎么做,因为下面的一个不起作用。
- name: Ensure Opsware agent is running on AIX
service: name={{ aix_service_path }} state=started enabled=yes
register: aix_status
- name: Opsware AIX Notify only if it failed
when: aix_status|success
notify:
- hardware refresh
- software refresh
- name: hardware refresh
command: chdir=/opt/opsware/agent/pylibs/cog/ ./bs_hardware
- name: software refresh
command: chdir=/opt/opsware/agent/pylibs/cog/ ./bs_Software
【问题讨论】: