entanet_devops.supervisor
监控工具
设计用于仅安装监控工具,并为您提供对配置的完全控制。
仅在 Ubuntu 18.04 上测试。
角色变量
supervisor_disable (默认值: True)
artisan_template - Artisan 命令模板的位置(默认角色模板)
raw_template - 原始命令模板的位置(默认角色模板)
supervisor_command_user - 执行命令的默认用户
supervisor_command_numprocs - 执行命令的默认进程数量
app_directory - Artisan 应用安装的位置
- 也是 supervisor/supervisor_commands.yml 的位置
可以在包含的 supervisor_commands.yml 或 default_vars 中的 'supervisor_commands' 映射变量中指定命令
简单示例:
文件: supervisor_commands.yml:
artisan_commands:
- my:artisan_cmd
- my:artisan_cmd2
- my:artisan_cmd3
raw_commands:
- /full/path/to/my/cmd
与角色组变量中的覆盖示例:
(注意,覆盖变量会合并到从 supervisor_commands.yml 加载的变量中)
文件: group_vars/all/main.yml:
artisan_commands_override:
- cmd: artisan_cmd2
user: myuser
numprocs: 4
raw_commands_override:
- /additional/path/of/thing/to/run
文件: supervisor_commands.yml:
artisan_commands:
- my:artisan_cmd
- my:artisan_cmd2
- my:artisan_cmd3
raw_commands:
- /full/path/to/my/cmd
在 supervisor_commands.yml 中使用用户/进程数覆盖示例:
(注意:列表项可以是字符串或映射)
文件: supervisor_commands.yml:
artisan_commands:
- my:artisan_cmd
- cmd: my:artisan_cmd2
user: myuser
numprocs: 3
- cmd: my:artisan_cmd3
numproc: 2
在启动时禁用监控工具
示例剧本
- hosts: servers
roles:
- entanet-devops.supervisor
安装
ansible-galaxy install entanet_devops.supervisor
许可证
bsd-3-clause
下载
22.7k
拥有者