Code Monkey home page Code Monkey logo

ansible-pacemaker2's Introduction

ansible-pacemaker2

Ansible modules set for Pacemaker, cluster resource manager for Linux/*NIX

It contains below:

  • pacemaker_resource: configure a pacemaker resource, including clone and master ones
  • pacemaker_resource_group: configure a pacemaker resource group
  • pacemaker_resource_default: configure default resource parameters
  • pacemaker_location: configure a location constraint
  • pacemaker_colocation: configure a colocation constraint
  • pacemaker_order: configure an order constraint
  • pacemaker_order_set: configure an order-set constraint
  • pacemaker_property: configure pacemaker cluster properties

They depend on cibadmin command.

Usage

- pacemaker_property:
    params: stonith-enabled=false start-failure-is-fatal="false"

- pacemaker_resource:
    name: mariadb-service
    type: ocf:heartbeat:mysql
    params: |
      binary=/usr/bin/mysqld_safe
      datadir=/var/lib/mysql
      log=/var/log/mariadb/mariadb.log
      pid=/run/mariadb/mariadb.pid
      replication_user=repl
      replication_passwd=slavepass
    op:
      - start interval=0 timeout=120s
      - stop interval=0 timeout=120s
      - monitor interval=20s timeout=30s
      - monitor interval=10s role=Master timeout=30s
      - monitor interval=30s role=Slave timeout=30s
      - promote interval=0 timeout=120s
      - demote interval=0 timeout=120s
      - notify interval=0 timeout=90s
    master: |
      master-max=1
      master-node-max=1
      clone-max=2
      clone-node-max=1
      notify=true

- pacemaker_resource:
    name: mariadb-vip
    type: ocf:heartbeat:IPaddr2
    params: ip=192.168.0.100
    op:
      - monitor interval=30s

- pacemaker_resource_group:
    resource:
      - mariadb-service
      - mariadb-vip

- pacemaker_colocation:
    resource1: mariadb-service=master
    resource2: mariadb-vip
    score: INFINITY

- pacemaker_locaiton:
    resource: mariadb-vip
    node: server1
    score: 100

ansible-pacemaker2's People

Contributors

yosshy avatar masayukig avatar

Stargazers

 avatar  avatar Aleksandr Sheliakin avatar teru avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

masayukig kteru

ansible-pacemaker2's Issues

basestring はPython3環境では使用不可

新しいAnsibleで実行すると、「'basestring' is not defined」となります。

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: name 'basestring' is not defined
fatal: [dev-img-0001a]: FAILED! => {"changed": false, "msg": "name 'basestring' is not defined", "params": "cluster-name=\"dev_img_0001_ha_cluster\" startup-fencing=true stonith-enabled=true no-quorum-policy=\"ignore\" start-failure-is-fatal=\"false\"", "state": "present"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.