Skip to content

Setup your development environment based on Ansible routines for software provisioning, configuration management, and application-deployment as infrastructure as code, tested with molecule.

License

Notifications You must be signed in to change notification settings

cmuck/config-files

Repository files navigation

config-files

CI

Setup your development environment based on Ansible routines for software provisioning, configuration management, and application-deployment as infrastructure as code, tested with molecule.

Installation

Setup SSH for Ansible

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

Setup Python and virtual environment using uv

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

Usage

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

Examples

  • 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

Playbook helloworld

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

Development

Details at DEVELOPMENT.md

Links

About

Setup your development environment based on Ansible routines for software provisioning, configuration management, and application-deployment as infrastructure as code, tested with molecule.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •