Skip to content

Commit

Permalink
SSH key is optional for user (closes #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
HanXHX committed Oct 4, 2016
1 parent 5297dbc commit 617ef94
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Each row have few keys:
- `groups`: (O) comma separated list of groups
- `createhome`: (O) yes/no
- `system`: (O) yes/no (default: no)
- `ssh_keys`: (M) list of ssh public keys. If you don't need any SSH key, please provide an empty list.
- `ssh_keys`: (O) ssh public keys list
- `state`: (O) present/absent (default: present)

(M) Mandatory
Expand Down
2 changes: 2 additions & 0 deletions tasks/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
with_subelements:
- "{{ dbs_users }}"
- ssh_keys
- flags:
skip_missing: true
when: item.0.state is not defined or item.0.state == 'present'

- name: TEMPLATE | Create sudoers file
Expand Down
2 changes: 0 additions & 2 deletions tests/test-travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
groups: 'superdaemon'
shell: '/usr/sbin/nologin'
sudo: false
ssh_keys: []
- name: 'regis'
ssh_keys: []
state: 'absent'
roles:
- ../../
Expand Down
2 changes: 0 additions & 2 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
groups: 'superdaemon'
shell: '/usr/sbin/nologin'
sudo: false
ssh_keys: []
password: '1a2b3c'
- name: 'regis'
ssh_keys: []
state: 'absent'
dbs_ntp_pkg: 'ntp'
dbs_locales:
Expand Down

0 comments on commit 617ef94

Please sign in to comment.