diff --git a/tasks/main.yml b/tasks/main.yml index 7cc7c73..0852802 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -34,8 +34,6 @@ when: debian.stdout register: upgrade -- debug: - var: upgrade # not required. A variable name to debug. Mutually exclusive with the 'msg' option. - name: Reboot updates to apply @@ -55,7 +53,6 @@ - name: create profil user: name: "{{user.name}}" # required. Name of the user to create, remove or modify. - skeleton: false # not required. Optionally set a home skeleton directory. Requires create_home option! create_home: yes # not required. Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist.,Changed from C(createhome) to C(create_home) in version 2.5. password: "{{userPassword}}" # not required. Optionally set the user's password to this crypted value.,On macOS systems, this value has to be cleartext. Beware of security issues.,See U(https://docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module) for details on various ways to generate these password values. system: no # not required. When creating an account C(state=present), setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users. @@ -94,11 +91,3 @@ user: "{{user.name}}" state: present key: "{{ lookup('file', '/home/{{user.name}}/.ssh/id_rsa.pub') }}" - -- name: Remove root SSH access - lineinfile: - dest: /etc/ssh/sshd_config - regexp: "^PermitRootLogin" - line: "PermitRootLogin no" - state: present - notify: restart ssh