https://github.com/dreknix/ansible-collection-setup
Ansible Collection for Setup Computers
https://github.com/dreknix/ansible-collection-setup
ansible ansible-collection
Last synced: 8 months ago
JSON representation
Ansible Collection for Setup Computers
- Host: GitHub
- URL: https://github.com/dreknix/ansible-collection-setup
- Owner: dreknix
- License: mit
- Created: 2023-03-06T11:03:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T09:25:58.000Z (over 1 year ago)
- Last Synced: 2025-01-31T10:27:43.204Z (over 1 year ago)
- Topics: ansible, ansible-collection
- Language: Jinja
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelogs/changelog.yaml
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Collection for Setup Computers
A collection of roles for configuring all Linux hosts. The roles are currently
only supporting Debian or Ubuntu based distros.
## Usage
Configure `collections_path` in `ansible.cfg`.
Insert collection into `requirements.yml`:
```yaml
collections:
- name: docker
source: git@github.com:dreknix/ansible-collection-setup.git
type: git
version: main
```
Use Galaxy to install the collection:
```console
$ ansible-galaxy install --force-with-deps -r requirements.yml
```
Import the playbook of the collection and overwrite the default values of the
variables:
```yaml
- name: Setup computers
ansible.builtin.import_playbook: dreknix.setup.playbook
vars:
keyboard_model: "pc105"
keyboard_layout: "de"
keyboard_variant: "nodeadkeys"
locale_lang: "en_US.UTF-8"
locale_list: ["{{ locale_lang }}"]
timezone: "Europe/Berlin"
```
## Roles
The following roles are available.
### Hostname
Set the host name to the Ansible variable `inventory_hostname`.
* **Tag**: `setup_hostname`
* **Variables**:
### Keyboard
Configure the keyboard layout.
* **Tag**: `setup_keyboard`
* **Variables**:
* `keyboard_model`: `pc104`
* `keyboard_layout`: `us`
* `keyboard_variant`: `''`
* `keyboard_options`: `''`
* `keyboard_backspace`: `guess`
### Locale
Configure the locale settings.
* **Tag**: `setup_locale`
* **Variables**:
* `locale_list`: `[en_GB.UTF-8, en_US.UTF-8]`
* `locale_lang`: `en_US.UTF-8`
* ...
### Timezone
Set the time zone.
* **Tag**: `setup_timezone`
* **Variables**:
* `timezone`: `Europe/London`
### Upgrade
Upgrade all packages.
* **Tag**: `setup_upgrade`
* **Variables**:
## License
[MIT](https://github.com/dreknix/ansible-collection-setup/blob/main/LICENSE)