Skip to content

Instantly share code, notes, and snippets.

@astropanic
Last active August 29, 2015 14:00
Show Gist options
  • Save astropanic/11042393 to your computer and use it in GitHub Desktop.
Save astropanic/11042393 to your computer and use it in GitHub Desktop.
Ansible - playbook error
---
- name: create group for deloyment and web
group:
state=present
name=web
system=yes
- name: create user for deployment and web
user:
state=present
name=web
group=www
home=/home/web
createhome=yes
generate_ssh_key=yes
ssh_key_bits=4096
ssh_key_type=rsa
ssh_key_comment="web user"
➜ ansible ansible-playbook -u root -i vagrant webserver.yml
PLAY [webservers] *************************************************************
GATHERING FACTS ***************************************************************
ok: [web.vagrant.box]
TASK: [deployment | create group for deloyment and web] ***********************
ok: [web.vagrant.box]
TASK: [deployment | create user for deployment and web] ***********************
failed: [web.vagrant.box] => {"failed": true, "item": ""}
msg: Group www does not exist
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/wopi/webserver.retry
web.vagrant.box : ok=2 changed=0 unreachable=0 failed=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment