Class: Caco::Repmgr::NodeRole
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- Caco::Repmgr::NodeRole
- Defined in:
- lib/caco/repmgr/node_role.rb
Instance Method Summary collapse
Instance Method Details
#verify_role(ctx, node_name:, output:) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/caco/repmgr/node_role.rb', line 11 def verify_role(ctx, node_name:, output:, **) match = output.match(/^\s+[0-9]{1,}\s+\|\s+db1\s+\|\s+([^\s]+)\s+\|/) return false unless match ctx[:node_role] = match[1] end |