Setup your development environment based on Ansible routines for software provisioning, configuration management, and application-deployment as infrastructure as code, tested with molecule.
Ansible is used to configure the system and requires a SSH connection.
First, ensure to have an up-to-date system
sudo apt update && sudo apt dist-upgrade
A vanilla Ubuntu installation missing
openssh-server
which is required by Ansible.
sudo apt install openssh-server curl
Check if openssh-server is running
systemctl status ssh
Please re-use your existing SSH key if already created or create a new SSH key
The script is based on Python 3.12 and a virtual environment, so install these dependencies.
Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Install Python 3.12 by
uv python install 3.12
Create the virtual environment
uv sync
Activate the virtual environment
source .venv/bin/activate
When installed to the local virtual environment, you can use the script by the command cf
cf -h
usage: config-files [-h] [-t TAG [TAG ...]] [-v] [-d] [-c] playbook
positional arguments:
playbook Playbook from playbooks directory, e.g. "helloworld"
optional arguments:
-h, --help show this help message and exit
-t TAG [TAG ...], --tag TAG [TAG ...]
Only tag from playbook is executed, e.g. --tag zsh git
-v, --verbose Increase verbosity of ansible to level 1
-d, --dry-run Execution with --check option
-c, --check Executes only a syntax-check of the playbook
-
Default usage
cf developer
-
Syntax-check of the playbook
cf -c developer
-
Dry-run of the playbook
cf -d developer
-
Execute specific tags of the playbook
cf -t zsh git developer
-
Increase verbosity
cf -v developer
Can be used to check e.g. if config-files and Ansible works properly
cf helloworld
cf -v helloworld
cf -d helloworld
cf -c helloworld
Details at DEVELOPMENT.md