Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRunPlugin ¶
CheckRunPlugin Checks if the ID belongs to the group or container calls the plugin function the appropriate amount of times
func DeletePlugin ¶
DeletePlugin The following function deletes a plugin based on the plugin name provided.
func DownloadPlugin ¶
DownloadPlugin This functions downloads package from a git repo.
func RunPluginContainer ¶
RunPluginContainer Runs ansible plugin based on plugin name and container name which is derived from the tracked containers file We pass in the group ID as a parameter because when we modify the ports taken
Types ¶
type ExecuteIP ¶
ExecuteIP IP Address to execute Ansible instruction
func (*ExecuteIP) ModifyHost ¶
ModifyHost adds IP address , port no to the config file
func (*ExecuteIP) RunAnsible ¶
RunAnsible Executes based on credentials on the struct
type Host ¶
type Host struct { All struct { Vars struct { AnsiblePythonInterpreter string `yaml:"ansible_python_interpreter"` } `yaml:"vars"` } `yaml:"all"` Main struct { Hosts struct { Host1 struct { AnsibleHost string `yaml:"ansible_host"` AnsiblePort int `yaml:"ansible_port"` AnsibleUser string `yaml:"ansible_user"` AnsibleSSHPass string `yaml:"ansible_ssh_pass"` AnsibleSudoPass string `yaml:"ansible_sudo_pass"` } `yaml:"host1"` } `yaml:"hosts"` } `yaml:"main"` }
Host Struct for ansible host Generated from https://zhwt.github.io/yaml-to-go/
type Plugin ¶
type Plugin struct { FolderName string PluginDescription string Execute []*ExecuteIP NumOfPorts int // contains filtered or unexported fields }
Plugin Information about the plugins available
func SearchPlugin ¶
SearchPlugin Detects plugin information based on the name provided on the parameter
func (*Plugin) AutoSetPorts ¶
AutoSetPorts Automatically maps free ports to site.yml file
func (*Plugin) CopyToTmpPlugin ¶
CopyToTmpPlugin This function would ensure that we create a copy of the plugin in the tmp directory, and it would be executed from there. This due to the reason of automating port allocation when running plugins
func (*Plugin) ExecutePlugin ¶
ExecutePlugin Function to execute plugins that are called