|
|
|
|
@ -13,3 +13,34 @@
|
|
|
|
|
state: restarted |
|
|
|
|
enabled: yes |
|
|
|
|
|
|
|
|
|
- name: add files user |
|
|
|
|
user: |
|
|
|
|
name: files |
|
|
|
|
home: /var/www/localhost |
|
|
|
|
password: '' |
|
|
|
|
|
|
|
|
|
- name: set files user as owner of http docroot |
|
|
|
|
file: |
|
|
|
|
path: /var/www/localhost |
|
|
|
|
state: directory |
|
|
|
|
recurse: yes |
|
|
|
|
owner: files |
|
|
|
|
group: files |
|
|
|
|
|
|
|
|
|
- name: add ssh path for files user |
|
|
|
|
file: |
|
|
|
|
path: /var/www/localhost/.ssh |
|
|
|
|
state: directory |
|
|
|
|
owner: files |
|
|
|
|
group: files |
|
|
|
|
mode: 0700 |
|
|
|
|
|
|
|
|
|
- name: copy ssh pubkey for files user |
|
|
|
|
copy: |
|
|
|
|
remote_src: yes |
|
|
|
|
owner: files |
|
|
|
|
group: files |
|
|
|
|
src: /root/.ssh/authorized_keys |
|
|
|
|
dest: /var/www/localhost/.ssh/authorized_keys |
|
|
|
|
mode: 0600 |
|
|
|
|
|
|
|
|
|
|