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) on Docker. The project ensures that the necessary configurations and installations are performed automatically.
- 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/hostsfile with necessary entries. - Install Docker: Installs Docker to facilitate containerized applications.
- Extensible: New features and configurations may be added during development.
To use this Ansible project, follow these steps:
Clone the repository to your local machine:
git clone https://github.com/MarcoColomb0/unattended-ubuntu.gitChange directory to the project folder:
cd unattended-ubuntuEdit the ansible.cfg file to include the necessary configurations.
Edit the 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:
[targets]
postgres-1
postgres-2
[targets:vars]
ansible_user=marco
ansible_ssh_private_key_file=~/.ssh/ansibleCustomize the playbooks in the playbooks directory to suit your specific requirements. For example, you can modify playbooks/setup_time.yaml to change the timezone or NTP server, edit assets/hosts to add the necessary entries to the /etc/hosts file.
ansible-galaxy install -r requirements.yamlansible-playbook -i inventory playbook.yaml- ansible-core 2.16.9
- Python 3.12.3
- Ubuntu 24.04
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.