Skip to content

Commit f9bc928

Browse files
author
Colin Hoglund
committed
test item.group functionality
1 parent 3c88b13 commit f9bc928

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ script:
2929
- id ansibletestuser2 | grep --silent "uid=2223(ansibletestuser2) gid=2223(ansibletestuser2) groups=2223(ansibletestuser2),2(bin),100(users)"
3030
- id ansibletestuser3 | grep --silent "uid=2224(ansibletestuser3) gid=4000(ansibletestgroup) groups=4000(ansibletestgroup),2(bin),100(users)"
3131
- id ansibletestuser4 | grep --silent "uid=2225(ansibletestuser4) gid=100(users) groups=100(users),2(bin)"
32+
- id ansibletestuser5 | grep --silent "uid=2226(ansibletestuser5) gid=4000(ansibletestgroup) groups=4000(ansibletestgroup),2(bin),100(users)"
3233
- grep --silent "^ansibletestgroup:" /etc/group
3334
- grep --silent "^ansibletestgroup1:" /etc/group
3435
- ls -lgd /home/ansibletestuser | awk '{exit $3!="ansibletestuser"}'
3536
- ls -lgd /home/otherdirectory | awk '{exit $3!="ansibletestuser2"}'
3637
- ls -lgd /home/ansibletestuser3 | awk '{exit $3!="ansibletestgroup"}'
3738
- ls -lgd /home/otherdirectory1 | awk '{exit $3!="users"}'
38-
- ls -lg /home/ansibletestuser/.profile | awk '{exit $3!="ansibletestuser"}'
39-
- ls -lg /home/otherdirectory/.profile | awk '{exit $3!="ansibletestuser2"}'
40-
- ls -lg /home/ansibletestuser3/.profile | awk '{exit $3!="ansibletestgroup"}'
41-
- ls -lg /home/otherdirectory1/.profile | awk '{exit $3!="users"}'
39+
- ls -lgd /home/ansibletestuser5 | awk '{exit $3!="ansibletestgroup"}'
40+
- ls -lg /home/ansibletestuser/.profile | awk '{exit $3!="ansibletestuser"}'
41+
- ls -lg /home/otherdirectory/.profile | awk '{exit $3!="ansibletestuser2"}'
42+
- ls -lg /home/ansibletestuser3/.profile | awk '{exit $3!="ansibletestgroup"}'
43+
- ls -lg /home/otherdirectory1/.profile | awk '{exit $3!="users"}'
44+
- ls -lgd /home/ansibletestuser5/.profile | awk '{exit $3!="ansibletestgroup"}'
4245

4346
notifications:
4447
webhooks: https://galaxy.ansible.com/api/v1/notifications/

tests/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,25 @@
8484

8585
roles:
8686
- ansible-users
87+
88+
- hosts: localhost
89+
remote_user: root
90+
vars:
91+
users_create_per_user_group: false
92+
define_individual_user_group: true
93+
users:
94+
- name: Ansible Test User5
95+
username: ansibletestuser5
96+
uid: 2226
97+
group: ansibletestgroup
98+
groups: [users, bin]
99+
shell: /bin/sh
100+
home: /home/otherdirectory2
101+
profile: |
102+
alias ll='ls -lah'
103+
alias cp='cp -iv'
104+
ssh_key:
105+
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVpUJQCOaPg3p5xro9e+1fkGRWNOGrrExiKMqTE91Fwu349bxfMnMzRS0PAERouR9EEL+Ee4Yzhav/uNc35eCtXzACtluXnAncMrQj6pM3IqASynhvXTygHljmcMbBSDQtLrTZeW+YzIcOgk5UM1yBi26WoUYva2aCr9IRvKdYreAK08OiMdZedpOye0ZdvIYJGcyITwc6YMmrAhP7jZlrk/mDEkf2a4eBp+475o7MJtaC9npqYkToM8vqvx5AGEKqXt7/f1/paOY7KsR+VGPQy6k2RkXjWBsXPesZ3d3XLZHE60wAk0EsuJO8A25+uWSB6ILQeRSYYmGea/WIf6kd [email protected]"
106+
107+
roles:
108+
- ansible-users

0 commit comments

Comments
 (0)