Skip to content

XIIIMICT/ansible_toolkit

Repository files navigation

ansible_toolkit

license Python versions release downloads code size

Ansible Lint & yamllint checks CodeQL (GH Actions)

An Ansible playbook set for my personal needs: configuring WSL (Arch Linux) and a single VDS server (Ubuntu/Debian).

What's inside

  • package installation and Docker setup
  • connection of AUR and Chaotic-AUR for Arch Linux
  • non-root user setup
  • Fish shell configs for the user
  • Pay Respects for user's shell (Fish or Bash)
  • client- and server-side SSH setup
  • ufw and Fail2Ban configs

Installation and Usage

  1. Clone the repository and enter its directory.

  2. Install the uv package manager using one of the available methods. For example, on Linux/macOS:

curl -LsSf https://astral.sh/uv/install.sh | sh

You can also use the package provided by your distribution's package manager, if exists (e.g. for Arch Linux).

  1. Install Ansible:
uv sync --no-dev

Then activate the .venv virtual environment.

You can also use Ansible packages provided by your distribution's package manager.

  1. Install the project's Ansible dependencies:
ansible-galaxy install -r requirements.yaml
  1. Create inventory/group_vars/all/secrets.yaml based on the example.
  2. Run playbooks with:
ansible-playbook -u root playbooks/<PLAYBOOK_FILE>  # if the user has not been created yet 
ansible-playbook playbooks/<PLAYBOOK_FILE> --ask-become-pass

Development

  1. Install the full dependency set:
uv sync
  1. Install the pre-commit hook for linting Ansible and YAML files:
pre-commit install
  1. To format code, run:
ansible-lint --fix
yamllint .

About

An Ansible playbook set for my personal needs

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages