ansible

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AnsibleInventoryFile is the default inventory file name
	AnsibleInventoryFile = "inventory.ini"
	// AnsibleConfigFile is the default ansible config file name
	AnsibleConfigFile = "ansible.cfg"
)

Functions

func CommentConfig

func CommentConfig(clsName string) error

CommentConfig add `#` to the head of each lines for imported configs

func GetHostPort

func GetHostPort(host *aini.Host, cfg *ini.File) int

GetHostPort tries to read the SSH port of the host

func ImportConfig

func ImportConfig(name string, clsMeta *spec.ClusterMeta, gOpt operator.Options) error

ImportConfig copies config files from cluster which deployed through tidb-ansible

func LoadConfig

func LoadConfig(clsName string, cls *spec.ClusterMeta) error

LoadConfig files to clusterMeta, include tidbservers, tikvservers, pdservers pumpservers and drainerservers

func ParseAndImportInventory

func ParseAndImportInventory(dir, ansCfgFile string, clsMeta *spec.ClusterMeta, inv *aini.InventoryData, sshTimeout uint64, sshType executor.SSHType) error

ParseAndImportInventory builds a basic ClusterMeta from the main Ansible inventory

func ReadInventory

func ReadInventory(dir, inventoryFileName string) (string, *spec.ClusterMeta, *aini.InventoryData, error)

ReadInventory reads the inventory files of a TiDB cluster deployed by TiDB-Ansible

func SSHKeyPath

func SSHKeyPath() string

SSHKeyPath gets the path to default SSH private key, this is the key Ansible uses to connect deployment servers

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL