Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Apache service state from 'running' to 'started' #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SethFranklin
Copy link

Hi Jeff,

I was going through the example under the Playbook Variables heading in Chapter 5, and noticed that when running the service task to start Apache, the state was listed as state: running, however that gave me the error in the logs below, saying that running isn't a valid value of state. I believe it should be changed to state: started, which worked on my end when I changed it to that and tried it out. I am proposing that change in this pull request.

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.56.66]

TASK [Include vars file] *******************************************************
ok: [192.168.56.66] => (item=/mnt/d/Documents/ansible/ch05_01/apache_RedHat.yaml)

TASK [Install Apache.] *********************************************************
ok: [192.168.56.66]

TASK [Ensure Apache is running.] ***********************************************
fatal: [192.168.56.66]: FAILED! => {"changed": false, "msg": "value of state must be one of: reloaded, restarted, started, stopped, got: running"}

PLAY RECAP *********************************************************************
192.168.56.66              : ok=3    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Thanks for writing this book, it's been very helpful in streamlining my path to competence in Ansible.

Seth

@geerlingguy geerlingguy added bug Something isn't working planned labels Dec 7, 2024
@geerlingguy
Copy link
Owner

Ah thank you! Don't know how that slipped through the cracks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working planned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants