Browse Source

improve and bugfix ssh auth

Lilian Roller 2 months ago
parent
commit
a87933fb90
No account linked to committer's email address
3 changed files with 7 additions and 3 deletions
  1. 3
    0
      defaults/main.yml
  2. 3
    2
      tasks/main.yml
  3. 1
    1
      vars/main.yml

+ 3
- 0
defaults/main.yml View File

@@ -14,3 +14,6 @@ accounts: []
14 14
 
15 15
 # SSH Login Warning
16 16
 ssh_root_login_warning: 'Please login as your own user rather than the user \"root\".'
17
+
18
+# copy bashrc to all users
19
+home_sweet_home: true

+ 3
- 2
tasks/main.yml View File

@@ -52,6 +52,7 @@
52 52
     group: '{{ item }}'
53 53
     mode: 'u=rw,g=r,o='
54 54
   with_items: '{{ accounts }}'
55
+  when: home_sweet_home
55 56
 
56 57
 
57 58
 - name: Add ansible user
@@ -110,11 +111,11 @@
110 111
     group: root
111 112
     mode: 'u=r,g=r,o='
112 113
 
113
-- name: adding existing user '{{ item }}' to group sudo
114
+- name: adding existing user '{{ item }}' to group admins
114 115
   become: yes
115 116
   user:
116 117
     name: '{{ item }}'
117
-    groups: sudo
118
+    groups: admins
118 119
     append: yes
119 120
   with_items: '{{ admins }}'
120 121
 

+ 1
- 1
vars/main.yml View File

@@ -1 +1 @@
1
-restrict_ssh_root_access: False
1
+restict_ssh_root_access: False