ansible

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 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

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

GetAnsibleHostsFromInventory gets alias of all hosts in an inventory file

func GetHostByNodeID

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

func GetHostMapfromAnsibleInventory

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

func GetInventoryFromAnsibleInventoryFile

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

func UpdateInventoryHostPublicIP

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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