https://github.com/vitalk/ansible-domu
Ansible recipe to configure a new domU guest to work
https://github.com/vitalk/ansible-domu
Last synced: 6 months ago
JSON representation
Ansible recipe to configure a new domU guest to work
- Host: GitHub
- URL: https://github.com/vitalk/ansible-domu
- Owner: vitalk
- Created: 2014-03-26T12:12:57.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-21T12:06:20.000Z (almost 12 years ago)
- Last Synced: 2025-08-11T03:58:09.646Z (12 months ago)
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
What is it?
-----------
Ansible recipe to configure a new guest to work.
## How to run
```bash
ansible-playbook recipe.yml -i hosts.example -u root --ask-su-pass
```
### Examples
The desired behavior can be refined via variables.
```yaml
user:
# The user's id
id: 1000
# The user's name
name: user
# The user's encrypted password
password: pass
# The user's shell to login
shell: /bin/bash
# Path to identity key associated with user
identity_key: "/path/to/identity.pub"
# Whether to generate a SSH key for the user. This will not overwrite an
# existing SSH key.
generate_ssh_key: no
group:
# The group id
id: 1000
# The user's primary group
name: admin
```
* Create a new admin user and add the your identity key to `authorized_keys` on
host:
```yaml
- hosts: mybox
roles:
- role: domU
user:
name: vital
password: letmein
shell: /bin/bash
id: 1000
generate_ssh_key: yes
identity_key: "/path/to/identity.pub"
```
* Create an admin user that unable to login into host (for running certain cron
jobs):
```yaml
- hosts: mybox
roles:
- role: domU
user:
name: zoe
password: letmein
shell: /bin/nologin
id: 1001
```