Skip to content
Snippets Groups Projects
Commit 07629f0f authored by nimrod's avatar nimrod
Browse files

- Correct test, use users_sudo_group instead of sudoers.

parent b56001df
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ users:
comment: '{{ ansible_hostname }} root'
#shell: /bin/bash
#uid: 0
#groups: sudoers
#groups: '{{ users_sudo_group }}'
#pubkeys:
#- '{{ lookup("file", "id_rsa.pub") }}'
#email: none@nowhere.com
......@@ -27,7 +27,7 @@
- name: dummy
groups:
- people
- sudoers
- '{{ users_sudo_group }}'
pubkeys:
- '{{ lookup("file", "id_rsa.pub") }}'
- name: person
......
......@@ -3,7 +3,8 @@ from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_users(Command, Ansible):
def test_users(Command, Ansible, Sudo):
with Sudo():
assert Command('''ssh dummy@localhost sudo whoami''').stdout == 'root'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment