-
Notifications
You must be signed in to change notification settings - Fork 1
/
users.yml
51 lines (48 loc) · 1.99 KB
/
users.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- name: 添加用户
hosts: demo
become: yes
gather_facts: yes
roles:
- role: users
# 用户组
users_group_list:
#- name: tim
# state: absent
- name: tim
# 系统组
#system: yes
gid: 1000
state: present
users_user_list:
#- name: tim
# state: absent
- name: tim
state: present
# 系统用户
#system: yes
# 密码有效期
#password_validity_days: 15
# You can set a password. (Hashed and salted.)
password: "$6$pLeyBQQYtMTMMIRI$KsxLqWNwqhRNb2DcyDFkwfqPWX0UbyPolxdk14QKCVzKI0FqL/6kiF4YnKeWKbKRcAIOojF8S51eCkwNl0Vge."
#password: "$6$WsfOAUPcGUmhYgBb$MibOtOBsirEnGAxVUirh5doS/UgTJt1KLIkLgKW2371ZcONYe/wuRdoN6f0gQdjKVQdrTcZR0.scsmcd0.InH."
# 创建用户时设置密码,如果不开启则可实现定期更新密码功能
update_password: on_create
# 是否允许执行crontab任务
#cron_allow: yes
comment: normal user
# The `group` and `groups` listed here should exist.
group: tim
# groups: users,wheel
groups: wheel
# 无口令sudo
#sudo_options: "ALL=(ALL) NOPASSWD: ALL"
# 设置ssh免密
authorized_keys:
#- "https://192.168.60.10/ssh/pubkey/id_rsa.pub"
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyxvR9HUHMZMsf4Oy2FZBRzk9xVdnlHrwMJmko7ZekRrLvyMwEDJcwVidDjxtubmIR6eAgBaQztF6M0njqTz4wKZ+kooqJ6o7aoF3ucORpiVhDJs78jfjrHn3bx7XhJH9wORc4yi1tJbRo5Oo3R2EJencUunm567263pM/Gg8O05caScQa5vrfX4UBu5OPkdLnZ7eFIQkRQAFerC5uqNcKu9zw0lREscjY8Keht8nqYjV8olZUMTBV8fYcfvMNdfZdbBq6tS9s6zSisRO8q4uaPQ2uGPGxJskU/4pGnDZYa7B0XIguMOUoEu/B+0GOFd2u3ohr+T5Dq71cIVtwWNZ root@openeuler"
# EPOCH timestamp when an account should expire.
# Typically a positive value like: `1641971487`.
# The value `-1` removes the expiry time.
expires: -1
uid: 1000