Documentation ¶
Index ¶
- type ChildrenGroup
- type DefaultInventoryParser
- type DefaultInventoryReader
- type GroupDetail
- type HostDetail
- type HostInventory
- type Inventory
- type InventoryManager
- type InventoryParser
- type InventoryReader
- type InventoryService
- func (s *InventoryService) GetAccessConfig(groupName, hostName string) (*access.AccessConfig, error)
- func (s *InventoryService) GetGroupHosts(group string) []HostDetail
- func (s *InventoryService) GetGroups() []GroupDetail
- func (s *InventoryService) GetHostAddress(groupName, hostName string) (string, error)
- func (s *InventoryService) GetHostPassword(groupName, hostName string) (string, error)
- func (s *InventoryService) GetHostPort(groupName, hostName string) (int, error)
- func (s *InventoryService) GetHostSSHAgent(groupName, hostName string) (bool, error)
- func (s *InventoryService) GetHostSSHAgentForwarding(groupName, hostName string) (bool, error)
- func (s *InventoryService) GetHostSSHKey(groupName, hostName string) (string, error)
- func (s *InventoryService) GetHostUsername(groupName, hostName string) (string, error)
- func (s *InventoryService) GetUngroupedHosts() []HostDetail
- type Vars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildrenGroup ¶
type DefaultInventoryParser ¶ added in v0.1.1
type DefaultInventoryParser struct{}
type DefaultInventoryReader ¶ added in v0.1.1
type DefaultInventoryReader struct{}
func (*DefaultInventoryReader) ReadInventory ¶ added in v0.1.1
func (reader *DefaultInventoryReader) ReadInventory(filePath string) (string, error)
type GroupDetail ¶ added in v0.1.1
type GroupDetail struct { Name string Vars Vars Hosts []HostDetail }
type HostDetail ¶ added in v0.1.1
type HostInventory ¶
type HostInventory struct { Hosts map[string]Vars `yaml:"hosts"` Children map[string]ChildrenGroup `yaml:"children"` Vars Vars `yaml:"vars"` }
type Inventory ¶
type Inventory struct {
All HostInventory `yaml:"all"`
}
func DefaultInventory ¶ added in v0.1.1
func DefaultInventory() Inventory
type InventoryManager ¶ added in v0.1.1
type InventoryManager interface { GetUngroupedHosts() []HostDetail GetGroups() []GroupDetail GetGroupHosts(group string) []HostDetail GetHostSSHAgent(groupName, hostName string) (bool, error) GetHostSSHAgentForwarding(groupName, hostName string) (bool, error) GetHostSSHKey(groupName, hostName string) (string, error) GetHostUsername(groupName, hostName string) (string, error) GetHostPassword(groupName, hostName string) (string, error) GetHostAddress(groupName, hostName string) (string, error) GetHostPort(groupName, hostName string) (int, error) GetAccessConfig(groupName, hostName string) (*access.AccessConfig, error) }
type InventoryParser ¶ added in v0.1.1
type InventoryReader ¶ added in v0.1.1
type InventoryService ¶ added in v0.1.1
type InventoryService struct {
Inventory *Inventory
}
func NewInventoryService ¶ added in v0.1.1
func NewInventoryService(reader InventoryReader, parser InventoryParser) (*InventoryService, error)
func (*InventoryService) GetAccessConfig ¶ added in v0.1.1
func (s *InventoryService) GetAccessConfig(groupName, hostName string) (*access.AccessConfig, error)
func (*InventoryService) GetGroupHosts ¶ added in v0.1.1
func (s *InventoryService) GetGroupHosts(group string) []HostDetail
func (*InventoryService) GetGroups ¶ added in v0.1.1
func (s *InventoryService) GetGroups() []GroupDetail
func (*InventoryService) GetHostAddress ¶ added in v0.1.1
func (s *InventoryService) GetHostAddress(groupName, hostName string) (string, error)
func (*InventoryService) GetHostPassword ¶ added in v0.1.1
func (s *InventoryService) GetHostPassword(groupName, hostName string) (string, error)
func (*InventoryService) GetHostPort ¶ added in v0.1.1
func (s *InventoryService) GetHostPort(groupName, hostName string) (int, error)
func (*InventoryService) GetHostSSHAgent ¶ added in v0.1.1
func (s *InventoryService) GetHostSSHAgent(groupName, hostName string) (bool, error)
func (*InventoryService) GetHostSSHAgentForwarding ¶ added in v0.1.1
func (s *InventoryService) GetHostSSHAgentForwarding(groupName, hostName string) (bool, error)
func (*InventoryService) GetHostSSHKey ¶ added in v0.1.1
func (s *InventoryService) GetHostSSHKey(groupName, hostName string) (string, error)
func (*InventoryService) GetHostUsername ¶ added in v0.1.1
func (s *InventoryService) GetHostUsername(groupName, hostName string) (string, error)
func (*InventoryService) GetUngroupedHosts ¶ added in v0.1.1
func (s *InventoryService) GetUngroupedHosts() []HostDetail
type Vars ¶
type Vars struct { Username string `yaml:"username,omitempty"` AnsibleUser string `yaml:"ansible_user,omitempty"` Password string `yaml:"password,omitempty"` AnsibleSshPASS string `yaml:"ansible_ssh_pass,omitempty"` SshKey string `yaml:"sshkey,omitempty"` Address string `yaml:"address,omitempty"` AnsibleHost string `yaml:"ansible_host,omitempty"` SshAgent bool `yaml:"sshagent,omitempty"` SshAgentForwarding bool `yaml:"sshagent_forwarding,omitempty"` Port int `yaml:"port,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.