Skip to content

Commit

Permalink
user: changing user home directory mode to 750
Browse files Browse the repository at this point in the history
security: add uwf package
  • Loading branch information
Marcin Mierzejewski committed Jul 30, 2015
1 parent dd73c15 commit 5d95ed1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/bootstrap/tasks/secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- name: Delete /etc/sudoers.d/ files
action: shell rm -f /etc/sudoers.d/*

- name: Install packages
action: apt pkg=ufw state=installed

- name: Setup ufw 22/tcp
action: shell ufw allow 22/tcp

Expand Down
3 changes: 3 additions & 0 deletions roles/user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: Add or update user and set password
action: user name={{ username }} password={{ password }} shell=/bin/bash

- name: Change user directory permissions to 750
file: path=/home/{{ username }} state=directory mode=750

- name: Add or udpate authorized key
action: authorized_key user={{ username }} key="{{ lookup('file', id_rsa_path) }}"
when: id_rsa_path is defined
Expand Down

0 comments on commit 5d95ed1

Please sign in to comment.