Menu

Tree [345612] master /
 History

HTTPS access


File Date Author Commit
 defaults 2024-09-06 Michail Shurutov Michail Shurutov [caa603] Fix errors after run ansible-lint
 files 2024-08-02 Michail Shurutov Michail Shurutov [9c7514] add hidden file into dir files
 handlers 2024-09-06 Michail Shurutov Michail Shurutov [caa603] Fix errors after run ansible-lint
 meta 2023-05-29 Michail Shurutov Michail Shurutov [05f108] set meta information about role; fix small bugs...
 molecule 2023-02-26 Michail Shurutov Michail Shurutov [25a2ea] Initial commit after create role
 tasks 2024-09-07 Michail Shurutov Michail Shurutov [345612] Fix errors in notfy
 templates 2023-03-24 Michail Shurutov Michail Shurutov [1ba86f] edit defaults/main.yml: add consul_http_client_...
 tests 2023-02-26 Michail Shurutov Michail Shurutov [25a2ea] Initial commit after create role
 vars 2024-09-06 Michail Shurutov Michail Shurutov [caa603] Fix errors after run ansible-lint
 .travis.yml 2023-02-26 Michail Shurutov Michail Shurutov [25a2ea] Initial commit after create role
 .yamllint 2023-02-26 Michail Shurutov Michail Shurutov [25a2ea] Initial commit after create role
 LICENSE 2023-03-24 Michail Shurutov Michail Shurutov [1a7f6f] add LICENSE file
 README.md 2023-07-03 Michail Shurutov Michail Shurutov [00f24c] edit README.md: change URL for install role by ...

Read Me

Role: consul

consul role is created for deploy consul solution for postgres HA

Copyright (C) 2023 Mikhail Shurutov

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Requirements

This role requires python v3 because python v2 is out of live.

Role Variables

System variables

consul_templates_dir is directory for role templates;
consul_vars_dir is directory for define role variables;
consul_config_dir is directory for configs;
consul_data_dir is directory for data;
consul_service_name is consul service name.

Package variables

consul_{{ ansible_package_manager }}_packages is list of necessary packages;

Configuration variables

consul_http_client_port is port for client connections;
consul_params_default: by default there are defined "datacenter", "data_dir", "domain", "server".

Using a Role

Variables Used

  • ANSIBLE_ROOT_DIR is path for static content: roles,configs,etc, for example: /data/ansible
  • ANSIBLE_ROOT_ROLE_DIR is path in roles_path config variable, for example: /data/ansible/roles
    Content of my ~/.ansible.cfg:
...
# additional paths to search for roles in, colon separated
#roles_path    = /etc/ansible/roles
roles_path    = /data/ansible/roles
...

Install role

GIT repo

user@host ~ $ cd $ANSIBLE_ROOT_ROLE_DIR
user@host roles $ git clone https://git.code.sf.net/p/consul-role/code consul

Ansible galaxy

Installation from command
user@host ~ $ cd $ANSIBLE_ROOT_DIR
user@host ansible $ ansible-galaxy role install mshurutov.consul -p roles
Installation from requirements.yml
user@host ~ $ cd $ANSIBLE_ROOT_DIR
user@host ansible $ grep consul requirements.yml
- name: mshurutov.consul
user@host ansible $ ansible-galaxy role install -r requirements.yml -p roles

Example Playbook

Role installed as git repo

...
- hosts: consul_group
  roles:
     - role: consul
...

Role installed by ansible-galaxy

...
- hosts: consul_group
  roles:
     - role: mshurutov.consul
...

Dependencies

License

GPLv2

Author Information

My name is Mikhail Shurutov, I'm an operations engineer since 1997.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.