- name: Restart Apache
service:
name: "{{ services }}"
state: restarted
enabled: yes
become: true
vars:
services:
- httpd

Have tried variants with different states, enabled, become. All fail with 
exact same error:
amzn-build: TASK [web_server : Restart Apache] 
********************************************* amzn-build: fatal: 
[127.0.0.1]: FAILED! => {"changed": false, "msg": "Could not find the 
requested service ['httpd']: host"}

Logging onto the instance and running:

sudo service httpd restart

Stopping httpd:                                            [FAILED]

Starting httpd:                                            [  OK  ]


Vanilla Amazon 2018.03 image with ansible installed via pip

I cannot see why ansible would report that httpd does not exist when it 
patently does

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/99d478d2-10a7-449a-b573-b3a83e308232%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to