2023-07-26 08:04:02 +00:00
|
|
|
---
|
2023-07-27 15:17:17 +00:00
|
|
|
- hosts: "{{ hosts_servers }}"
|
2023-07-26 08:04:02 +00:00
|
|
|
vars:
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Create a ssh user in the system
|
|
|
|
user:
|
|
|
|
name: "{{ ssh_user_name }}"
|
|
|
|
#password: "{{ item.password }}"
|
|
|
|
password: "{{ ssh_password | password_hash('sha512') }}"
|
|
|
|
update_password: always
|
|
|
|
state: present
|
|
|
|
groups: sudo
|
|
|
|
shell: /bin/bash
|
|
|
|
comment: ssh user
|