Sign inSign up

oneofftech/ansible-keepass

By oneofftech

•Updated over 6 years ago

containerized ansible with keepass integration.

Image
0

2.3K

oneofftech/ansible-keepass repository overview

⁠Ansible-Keepass

This repository holds a "all configuration described in code" provision and deployment system around Ansible⁠. Additionally it relies on a simple and encrypted KeePass⁠ storage file to manage the passwords of deployed machines.

⁠Requirements

Docker⁠ and Docker Compose⁠ will have to be already installed on the host system.

⁠Configuration

Before you start, all essential things for Ansible need to be placed into the data directory. Please add:

  • data/ansible.hosts - A typical Ansible inventory⁠ listing your machines, their IP addresses and SSH ports.
  • data/group_vars - Directory containing Group specific variables⁠ for the deployment.
  • data/playbooks - One or more Ansible playbooks⁠ to be available.
  • data/roles - The Ansible roles⁠, which are available (if managing with git, they can be perfectly included as submodules⁠).
  • data/ssh/id_rsa - The private key of a ssh key pair to connect to machines.
  • data/ssh/id_rsa.pub - The public key of a ssh key pair to connect to machines.
  • data/passwords.kdbx - A KeePass⁠ database file, holding the passwords of the users on the deployed machines.

You can also have a look at the example data repository⁠ to get a better idea.

⁠Server deployment

Deployment happens through a docker container which runs ansible.

  • Apply everything to all: docker-compose run --rm ansible_commander -i ansible.hosts playbooks/install.yml
  • Apply everything to one server: docker-compose run --rm ansible_commander -i ansible.hosts -l YOURSERVER playbooks/install.yml
⁠Only run certain roles

To save time, you can tell ansible to only run certain playbooks by supplying the --tags flag, which can use multiple parameters. A simple example would be --tags="kbox,vpn". To see a list of defined tags, you can check the site.yml.

⁠Check for changed configuration

To see the differences between the server and the configured playbooks, add the --check flag. To highlight the current state and proposed changes, additionally use the --diff flag.

For configuration of the individual roles, please check out the respective README.md files in the roles/ directory.

Tag summary

Content type

Image

Digest

Size

121.9 MB

Last updated

over 6 years ago

docker pull oneofftech/ansible-keepass