https://github.com/marcocolomb0/unattended-ubuntu
unattended-ubuntu is an Ansible project designed to autoconfigure Ubuntu instances.
https://github.com/marcocolomb0/unattended-ubuntu
ansible ubuntu unattended
Last synced: 12 months ago
JSON representation
unattended-ubuntu is an Ansible project designed to autoconfigure Ubuntu instances.
- Host: GitHub
- URL: https://github.com/marcocolomb0/unattended-ubuntu
- Owner: MarcoColomb0
- License: mit
- Created: 2024-08-10T16:05:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-26T21:08:59.000Z (about 1 year ago)
- Last Synced: 2025-05-30T07:47:16.902Z (about 1 year ago)
- Topics: ansible, ubuntu, unattended
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unattended-ubuntu




## Overview
`unattended-ubuntu` is an Ansible project designed to autoconfigure Ubuntu instances. Its primary goal is to prepare an Ubuntu instance for [EMS HA (Postgres HA)](https://docs.fortinet.com/document/forticlient/latest/ems-administration-guide/109604/ems-ha-with-postgres-ha-using-bitnami-docker) on Docker. The project ensures that the necessary configurations and installations are performed automatically.
## Features
- **Clean Machine IDs**: Ensures that machine IDs are cleaned on each run to avoid conflicts.
- **Setup Time**: Configures the system time settings.
- **Setup Hosts File**: Updates the `/etc/hosts` file with necessary entries.
- **Install Docker**: Installs Docker to facilitate containerized applications.
- **Extensible**: New features and configurations may be added during development.
## Usage
To use this Ansible project, follow these steps:
### 1. Clone the Repository
Clone the repository to your local machine:
```sh
git clone https://github.com/MarcoColomb0/unattended-ubuntu.git
```
Change directory to the project folder:
```sh
cd unattended-ubuntu
```
### 2. Edit the ansible config file
Edit the [`ansible.cfg`](https://github.com/MarcoColomb0/unattended-ubuntu/blob/main/ansible.cfg) file to include the necessary configurations.
### 3. Edit Inventory File
Edit the [`inventory`](https://github.com/MarcoColomb0/unattended-ubuntu/blob/main/inventory) file to include the IP addresses or hostnames of the target machines you want to configure. The `inventory` file should look something like this:
```ini
[targets]
postgres-1
postgres-2
[targets:vars]
ansible_user=marco
ansible_ssh_private_key_file=~/.ssh/ansible
```
### 4. Customize Playbooks
Customize the playbooks in the `playbooks` directory to suit your specific requirements. For example, you can modify [`playbooks/setup_time.yaml`](https://github.com/MarcoColomb0/unattended-ubuntu/blob/main/playbooks/setup_time.yaml) to change the timezone or NTP server, edit [`assets/hosts`](https://github.com/MarcoColomb0/unattended-ubuntu/blob/main/assets/hosts) to add the necessary entries to the `/etc/hosts` file.
### 5. Install Required Ansible Roles
```sh
ansible-galaxy install -r requirements.yaml
```
### 6. Run the Playbook
```sh
ansible-playbook -i inventory playbook.yaml
```
## Tested software versions
- ansible-core 2.16.9
- Python 3.12.3
- Ubuntu 24.04
## Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/MarcoColomb0/unattended-ubuntu/blob/main/LICENSE) file for details.