Skip to content

Ansible skeleton containing all playbooks + roles for project deployment

Notifications You must be signed in to change notification settings

brewmajsters/ansible-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible skeleton

All roles and playbooks required to fully deploy our system components

clone and update

clone: git clone --recurese-submodules <url> update: git pull --recurse-submodules

Usage prerequisites

  • ensure Ansible is present on management host:
pip3 install ansible

Development setup (Linux only)

Development playbooks are in the dev directory. These playbooks are dependent on an existing LXC container defined in the hosts file.

REQUIREMENTS:

Now you have a running instance of a Debian buster LXC container, which will host all applications.

DEPLOYMENT

  • run any of the dev playbooks as specified in the Exmaple on the bottom of this README.

Alternative development setup

If you're not on Linux or you don't want to use LXC containers.

  • modify the hosts file to your need
  • change the target host in each playbook you use

Production setup (meant for Raspberry pi only)

Production playbooks are in the prod directory. These playbooks are dependent on a accessible Raspberry pi.

REQUIREMENTS:

  • Raspberry pi accessible over SSH host brewmaster-pi as specified in the hosts file. (configured in ~/.ssh/config on the ansible host)
    • NOTE: this requirement is more specific to eliminate any skeleton modifications
Host brewmaster-pi
  Hostname 192.168.0.22
  Port 22
  User pi

DEPLOYMENT

Example usage

cd ansible-skeleton/
ansible-playbook playbooks/dev/brewmasters_backend.yml
# or
ansible-playbook playbooks/prod/master.yml

usefull options

'-i <path_to_inventory>' option

  • specifies the path to an inventory file
  • contains all target hostnames (example inventory)

'-K' option

  • ask_for_pass option which is often requirement in case of privilege escalation

'-C' option

  • runs a playbook in a check mode. Meaning no action is really done on the target system

'-D' option

  • runs a playbook in 'diff' mode. Shows differences in configuration files and other

refer to other options in the official ansible-playbook docs

About

Ansible skeleton containing all playbooks + roles for project deployment

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published