我试图检查我的服务器上运行的是redis。安装了ansible。
# Ansiblefile
role 'DavidWittman.redis'
# provision.yml
...
- tasks:
- name: redis | ensure service up and running
service: name=redis enabled=yes state=started
获得后:
TASK: [redis | ensure service up and running] *********************************
failed: [default] => {"failed": true}
msg: service not found: redis
FATAL: all hosts have already failed -- aborting
检查它的正确方法是什么?
答案 0 :(得分:1)
使用此ansible角色需要使用redis_6379或redis_ $ portnumber