forked from hmx/make_users
new readme
This commit is contained in:
parent
ecbe40af1d
commit
61dd0f6b97
1 changed files with 15 additions and 10 deletions
25
README.md
25
README.md
|
|
@ -1,15 +1,18 @@
|
||||||
# How to use:
|
# How to use:
|
||||||
|
|
||||||
## Adding a new user
|
## Adding a new user
|
||||||
To create a ssh key pair on the new users PC.
|
To create a ssh key pair on the new users PC:
|
||||||
|
```bash
|
||||||
ssh-keygen -f new_floss_key
|
ssh-keygen -f new_floss_key
|
||||||
|
|
||||||
The 'private' part should NEVER leave the user's PC.
|
The 'private' part should NEVER leave the user's PC.
|
||||||
( It is a good idea to add a keyphrase to protect the key, if the client PC is ever stolen or hacked.)
|
( It is a good idea to add a keyphrase to protect the key, if the client PC is ever stolen or hacked.)
|
||||||
|
|
||||||
you only need: new_floss_key.pub
|
You only need: new_floss_key.pub
|
||||||
|
|
||||||
open inventory/group_vars/all/users.yaml
|
- open inventory/group_vars/all/users.yaml
|
||||||
add a new entry:
|
- add a new entry:
|
||||||
|
```yaml
|
||||||
- username: alice
|
- username: alice
|
||||||
groups:
|
groups:
|
||||||
- ssh_login
|
- ssh_login
|
||||||
|
|
@ -19,15 +22,17 @@ add a new entry:
|
||||||
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... alice@laptop
|
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... alice@laptop
|
||||||
- replace this ^^^^ line, with new_floss_key.pub...
|
- replace this ^^^^ line, with new_floss_key.pub...
|
||||||
|
|
||||||
deploy with:
|
### Deploy with:
|
||||||
ansible-playbook site.yaml
|
- ansible-playbook site.yaml
|
||||||
|
|
||||||
## delete user:
|
## Delete user:
|
||||||
open inventory/group_vars/all/users.yaml
|
- open inventory/group_vars/all/users.yaml
|
||||||
add:
|
- add:
|
||||||
|
```yaml
|
||||||
- username: alice
|
- username: alice
|
||||||
__state: absent__
|
__state: absent__
|
||||||
and rerun:
|
- run:
|
||||||
|
```yaml
|
||||||
ansible-playbook site.yaml
|
ansible-playbook site.yaml
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue