Skip to content

Commit

Permalink
Added ssh-keys tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivomarino committed Nov 16, 2016
1 parent b7f2ef7 commit 4377745
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions playbooks/roles/common/tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
when: conf_env != "local"
tags: [ shell-users, users, groups ]

- name: deploy shell user groups if enabled
- name: provision shell user groups if enabled
group: name={{ item.key }} state=present
when: item.value.state == "enabled"
with_dict: '{{ conf_users }}'
Expand All @@ -34,26 +34,26 @@
with_dict: '{{ conf_users }}'
tags: [ shell-users, users, shell ]

- name: deploy shell users if enabled
- name: provision shell users if enabled
user: name={{ item.key }} group={{ item.key }} groups={{ item.value.groups }} comment="{{ item.value.name }}" home="{{ item.value.home }}" append=yes shell={{ item.value.shell }} state=present
when: item.value.state == "enabled"
with_dict: '{{ conf_users }}'
ignore_errors: yes
tags: [ shell-users, users, shell ]

- name: deploy ssh key if enabled
- name: provision ssh key if enabled
authorized_key: user={{ item.key }} key="{{ item.value.public_key }}" state=present
when: item.value.state == "enabled"
with_dict: '{{ conf_users }}'
tags: [ shell-users, users, ssh, shell ]
tags: [ shell-users, users, ssh, shell, ssh-keys ]

- name: deploy ssh key to deploy user if enabled
- name: provision ssh key to deploy user if enabled
authorized_key: user=deploy key="{{ item.value.public_key }}" state=present
when: item.value.state == "enabled" and item.value.is_deployer == True
with_dict: '{{ conf_users }}'
tags: [ shell-users, users, ssh, shell ]
tags: [ shell-users, users, ssh, shell, ssh-keys ]

- name: deploy private key for deploy user (development)
- name: provision private key for deploy user (development)
copy: content="{{ conf_users.deploy.private_key }}" dest=/home/deploy/.ssh/id_rsa owner=deploy group=deploy mode=600 backup=no
when: conf_env == "development"
tags: [ shell-users, users, ssh, shell ]
tags: [ shell-users, users, ssh, shell, ssh-keys ]

0 comments on commit 4377745

Please sign in to comment.