Documentation ¶
Index ¶
- Variables
- func CommentConfig(clsName string) error
- func GetHostPort(host *aini.Host, cfg *ini.File) int
- func ImportConfig(name string, clsMeta *spec.ClusterMeta, gOpt operator.Options) error
- func LoadConfig(clsName string, cls *spec.ClusterMeta) error
- func ParseAndImportInventory(dir, ansCfgFile string, clsMeta *spec.ClusterMeta, inv *aini.InventoryData, ...) error
- func ReadInventory(dir, inventoryFileName string) (string, *spec.ClusterMeta, *aini.InventoryData, error)
- func SSHKeyPath() string
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 ¶
CommentConfig add `#` to the head of each lines for imported configs
func GetHostPort ¶
GetHostPort tries to read the SSH port of the host
func ImportConfig ¶
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.
Click to show internal directories.
Click to hide internal directories.