ansible

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAnsibleHostInventory

func CreateAnsibleHostInventory(inventoryDirPath, certFilePath, cloudService string, publicIPMap map[string]string, cloudConfigMap models.CloudConfig) error

CreateAnsibleHostInventory creates inventory file for ansible specifies the ip address of the cloud server and the corresponding ssh cert path for the cloud server

func GetAnsibleHostsFromInventory added in v1.3.1

func GetAnsibleHostsFromInventory(inventoryDirPath string) ([]string, error)

GetAnsibleHostsFromInventory gets alias of all hosts in an inventory file

func GetHostByNodeID added in v1.3.4

func GetHostByNodeID(nodeID string, inventoryDirPath string) (*models.Host, error)

func GetHostMapfromAnsibleInventory added in v1.3.3

func GetHostMapfromAnsibleInventory(inventoryDirPath string) (map[string]*models.Host, error)

func GetInventoryFromAnsibleInventoryFile added in v1.3.3

func GetInventoryFromAnsibleInventoryFile(inventoryDirPath string) ([]*models.Host, error)

func UpdateInventoryHostPublicIP added in v1.3.3

func UpdateInventoryHostPublicIP(inventoryDirPath string, nodesWithDynamicIP map[string]string) error

UpdateInventoryHostPublicIP first maps existing ansible inventory host file content then it deletes the inventory file and regenerates a new ansible inventory file where it will fetch public IP of nodes without elastic IP and update its value in the new ansible inventory file

func WriteNodeConfigsToAnsibleInventory added in v1.5.3

func WriteNodeConfigsToAnsibleInventory(inventoryDirPath string, nc []models.NodeConfig) error

WriteNodeConfigsToAnsibleInventory writes node configs to ansible inventory file

Types

This section is empty.

Jump to

Keyboard shortcuts

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