ansible - 是否可以使用 Ansible 使用 start init.d 服务?
问题描述
Ansible 将失败以下任务
- name: Start opendj
service: name={{opendj_service_name}} state=started enabled=yes
因为该服务是 init.d 服务而不是 systemd
是否可以使用 Ansible 启动 init.d 服务?
解决方案
你试过如下
- name: make sure {{opendj_service_name}} is started
sysvinit:
name: {{opendj_service_name}}
state: started
enabled: yes
推荐阅读
- php - 未定义变量:annonces(查看:D:\wamp\www\aswak\resources\views\annonces\details.blade.php)
- python-3.x - 如何为具有 True、False 和 Null 值的布尔字段创建分层样本?
- java - 将数组中的 int 元素分成 2 个相等或几乎相等的 suma
- ios - 尝试使用 SwiftUI 的链接错误 - 未定义的符号:_swift_getOpaqueTypeConformance
- r - 从列中提取模式并在 R 数据框中创建一个新模式
- pytorch - pytorch dataloader default_collate 参数与 to(device) 一起使用
- java - 将3个数组合并成一个多维数组
- javascript - 通过点游创建对象映射,这是一个字符串
- elasticsearch - 如何按天或数据删除kibana中的文档
- ionic3 - Ionic storage Uncaught TypeError: Cannot read property 'storage' of null error when gettin onesignal playerid