Skip to content
alexanderbazhenoff edited this page Dec 17, 2023 · 13 revisions

An ansible collection with linux-related roles to perform various setups.

Project content

Roles:

bareos

Installs and configures Bareos and third-party components, adds Bareos file daemons to Bareos server, create user profiles and uploads configs to Bareos host:

  • Typical installation of all Bareos components on the single host with PostgreSQL installation or already preinstalled;
  • Typical installation of Bareos file daemon and add them to Bareos server;
  • Typical installation of Web UI with Apache2 web server and (optionally) create user pofile to access;
  • Uninstall Bareos components;
  • Copy already predefined configs to /etc/bareos directory.

Find more at wiki page.

postgresql

  • Install or uninstall specified version of PostgreSQL database server (or database instance). When specified PostgreSQL version repository is not available for your Linux distribution this will install default (or recommended) version for your Linux distribution;
  • Install or uninstall pgadmin4 alongside or single from database instance: pgadmin4 web version with Apache, desktop version or both;
  • Applies firewall rules (ufw and firewalld) for database instance and/or pgadmin4 web version installation or removes firewall rules during uninstall;
  • Configure pg_hba.conf on already installed database instance;
  • Configure postgresql.conf on already installed database instance;
  • Create, alter, or remove a user (role) from a PostgreSQL server instance;
  • Create, drop, dump, rename or restore PostgreSQL databases;
  • Add or remove PostgreSQL schemas;
  • Grant or revoke privileges on PostgreSQL database objects;
  • Add or remove replication slots from a PostgreSQL database.

lxcfs

Installs lxc or lxcfs on linux system. More info at wiki page.

zabbix agent

Installs zabbix agent and configures them for services, apps and platform autodiscovery on Zabbix Server side.

Configure tags for discovery of: mysql, postgresql, Bareos, nginx, apache, isc-dhcp-server, memcached, virtualization, containerization, baremetal platforms vendors and many more.

More info at wiki page.

Installation

Install from ansible galaxy:

  1. Set-up collection from ansible galaxy:
ansible-galaxy collection install alexanderbazhenoff.linux

If you need to use custom installation path, e.g.

ansible-galaxy collection install alexanderbazhenoff.linux -p /your/path

then edit ansible.cfg. Use ansible --version command to find the path of config file. Check docs.ansible.com for more info.

Install from sources:

  1. Clone via ssh:
git clone git@github.com:alexanderbazhenoff/ansible-collection-linux.git

or clone via https:

git clone https://github.com/alexanderbazhenoff/ansible-collection-linux.git
  1. Enter the project directory:
cd ansible-collection-linux

and build tar.gz archive of collection:

ansible-galaxy collection build
  1. Install collection from created tar.gz archive:
ansible-galaxy collection install $(ls -1 | grep ".tar.gz")

Usage.

  1. Create inventory and create playbook files. Include these roles into your playbook. These roles include example playbooks and inventory files already. You can also find usage examples in readme files or /example sub-folders.
  2. If you like it please vote on ansible galaxy page.
  3. If you found an issue please submit here with detailed information, e.g:
  • Playbook and parameters which the role was included with.
  • Distribution and output of: ansible --version.
  • What did you expect?
  • What did you get?

Thank you.

License

This Source Code Form is subject to the terms of the MIT-0 license.

Clone this wiki locally