127 lines
3.4 KiB
YAML
127 lines
3.4 KiB
YAML
|
---
|
||
|
- hosts: localhost
|
||
|
remote_user: root
|
||
|
|
||
|
vars:
|
||
|
debug_enabled_default: false
|
||
|
|
||
|
users:
|
||
|
- username: testuser101
|
||
|
password: $6$/y5RGZnFaD3f$96xVdOAnldEtSxivDY02h.DwPTrJgGQl8/MTRRrFAwKTYbFymeKH/1Rxd3k.RQfpgebM6amLK3xAaycybdc.60
|
||
|
update_password: on_create
|
||
|
comment: Test User 100
|
||
|
shell: /bin/bash
|
||
|
ssh_key: |
|
||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8crAHG/a9QBD4zO0ZHIjdRXy+ySKviXVCMIJ3/NMIAAzDyIsPKToUJmIApHHHF1/hBllqzBSkPEMwgFbXjyqTeVPHF8V0iq41n0kgbulJG testuser101@server1
|
||
|
ssh-rsa AAAA.... testuser101@server2
|
||
|
exclusive_ssh_key: yes
|
||
|
use_sudo: no
|
||
|
user_state: present
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser102
|
||
|
password: $6$F/KXFzMa$ZIDqtYtM6sOC3UmRntVsTcy1rnsvw.6tBquOhX7Sb26jxskXpve8l6DYsQyI1FT8N5I5cL0YkzW7bLbSCMtUw1
|
||
|
update_password: always
|
||
|
comment: Test User 101
|
||
|
groups: testnew102
|
||
|
shell: /bin/sh
|
||
|
use_sudo: yes
|
||
|
user_state: present
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser103
|
||
|
password: $6$wBxBAqRmG6O$gPbg9hYShkuIe3YKMFujwiKsPKZHNFwoK4yCyTOlploljz53YSoPdCn9P5k8Qm0z062Q.8hvJ6DnnQQjwtrnS0
|
||
|
update_password: always
|
||
|
use_sudo: no
|
||
|
user_state: present
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser104
|
||
|
ssh_key: ssh-rsa AAAB.... test104@server
|
||
|
exclusive_ssh_key: no
|
||
|
use_sudo: no
|
||
|
user_state: present
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser105
|
||
|
uid: 1099
|
||
|
password: $6$XEnyI5UYSw$Rlc6tXtECtqdJ3uFitrbBlec1/8Fx2obfgFST419ntJqaX8sfPQ9xR7vj7dGhQsfX8zcSX3tumzR7/vwlIH6p/
|
||
|
primarygroup: group105primary
|
||
|
ssh_key: ssh-rsa AAAB.... test107@server
|
||
|
use_sudo: no
|
||
|
user_state: lock
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser106
|
||
|
user_state: present
|
||
|
primarygroup: group106primary
|
||
|
primarygid: 2222
|
||
|
groups: groupcommon
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
|
||
|
- username: testuser107
|
||
|
user_state: present
|
||
|
groups: groupcommon, testgroupweb
|
||
|
servers:
|
||
|
- webserver
|
||
|
|
||
|
- username: testuser107
|
||
|
user_state: present
|
||
|
groups: groupcommon, testgroupdb
|
||
|
servers:
|
||
|
- database
|
||
|
|
||
|
- username: testuser108
|
||
|
user_state: present
|
||
|
generate_ssh_key: yes
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser109
|
||
|
user_state: present
|
||
|
generate_ssh_key: yes
|
||
|
ssh_key_bits: 4096
|
||
|
ssh_key_passphrase: "use_vault_instead_of_cleartext_for_production"
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser110
|
||
|
user_state: present
|
||
|
generate_ssh_key: no
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
- username: testuser111
|
||
|
user_state: present
|
||
|
system: yes
|
||
|
servers:
|
||
|
- webserver
|
||
|
- database
|
||
|
- monitoring
|
||
|
|
||
|
roles:
|
||
|
- ansible-role-create-users
|