Skip to content

Commit

Permalink
User private key suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahelal committed Apr 28, 2015
1 parent 3d54417 commit ed39275
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ usermanage_source_facts : "user_files"

# Temp solution to with_items and when condition issue
default_temp_solution :
- user: "x"
- user: "x"


usermanage_priv_key_suffix : ".ssh/id_rsa"
4 changes: 2 additions & 2 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
- name: users | Manage private key for users
copy:
content="{{ item.privkey }}"
dest="{{ usermanage_default_home_dir_prefix + "/" + item.user }}/.ssh/id_rsa"
dest="{{ item.home | default(usermanage_default_home_dir_prefix + "/" + item.user ) }}/{{ usermanage_priv_key_suffix}}"
mode=0600
owner="{{ item.user }}"
with_items: usermanage_users_privkey
when: usermanage_users_privkey is defined
no_log: True
# no_log: True

0 comments on commit ed39275

Please sign in to comment.