Created
January 4, 2017 22:14
-
-
Save lakshmi-kannan/3e44241db21cf99bf5bc3f5866d23f00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@test:/vagrant$ cat example_runbook.yml | |
--- | |
- hosts: all | |
sudo: true | |
vars: | |
users_admin_sudo_password: false | |
roles: | |
- role: willshersystems.users | |
users: | |
- name: carl | |
uid: 1010 | |
comment: 'Carl Crisp' | |
is_admin: yes | |
groups: | |
- beancounters | |
- name: ec_user | |
state: absent | |
users_groups: | |
- name: devs | |
gid: 1200 | |
users_ssh_keys: | |
- name: carl | |
keys: | |
- ssh-rsa AAAA....... [email protected] | |
ubuntu@test:/vagrant$ ansible-playbook -c local -i "$HOSTNAME," /vagrant/example_runbook.yml | |
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). | |
This feature will | |
be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. | |
PLAY [all] ********************************************************************* | |
TASK [setup] ******************************************************************* | |
ok: [test] | |
TASK [willshersystems.users : Load OS specific values] ************************* | |
ok: [test] => (item=/etc/ansible/roles/willshersystems.users/vars/Debian.yml) | |
TASK [willshersystems.users : Create groups] *********************************** | |
fatal: [test]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'name'\n\nThe error appears to have been in '/etc/ansible/roles/willshersystems.users/tasks/add_groups.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Create groups\n ^ here\n"} | |
to retry, use: --limit @/vagrant/example_runbook.retry | |
PLAY RECAP ********************************************************************* | |
test : ok=2 changed=0 unreachable=0 failed=1 | |
ubuntu@test:/vagrant$ ansible-playbook --version | |
ansible-playbook 2.2.0.0 | |
config file = /etc/ansible/ansible.cfg | |
configured module search path = Default w/o overrides | |
ubuntu@test:/vagrant$ |
Author
lakshmi-kannan
commented
Jan 4, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment