Explorar el Código

added option to set umask for local users

Fabian Peter Hammerle hace 8 años
padre
commit
04eb9d290b
Se han modificado 2 ficheros con 9 adiciones y 0 borrados
  1. 1 0
      defaults/main.yml
  2. 8 0
      tasks/main.yml

+ 1 - 0
defaults/main.yml

@@ -1,3 +1,4 @@
 vsftpd_allowed_users: []
 vsftpd_enable_write: no
 vsftpd_enable_access_without_shell: no
+vsftpd_local_user_umask: null

+ 8 - 0
tasks/main.yml

@@ -32,3 +32,11 @@
     line: '/bin/false'
     state: "{{vsftpd_enable_access_without_shell | ternary('present', 'absent')}}"
   become: yes
+- name: set umask for local users
+  lineinfile:
+    dest: /etc/vsftpd.conf
+    line: 'local_umask={{vsftpd_local_user_umask}}'
+    regexp: '#? *local_umask=.*'
+  become: yes
+  notify: reload vsftpd
+  when: vsftpd_local_user_umask != None