Documentation
¶
Index ¶
- Constants
- Variables
- func ParseFilter(filter string) (key, op, value string)
- type Command
- type Filter
- type Filters
- type Inventory
- type Play
- type Playbook
- type Project
- func (p Project) FilterInventory(filters []Filter) (filtered []*Inventory)
- func (p Project) InventoryKeys() (keys []string)
- func (p Project) InventoryValues(key string) (values []string)
- func (p Project) PlaybookPath(path string) (playbook *Playbook, err error)
- func (p Project) PlaybookPaths() (values []string)
- type Role
- type Task
Constants ¶
View Source
const ( Equal = "==" NotEqual = "!=" EndWith = "$=" Contains = "~=" StartWith = "^=" )
Variables ¶
View Source
var ( AllowedOperators = []string{Equal, NotEqual, StartWith, Contains, EndWith} FiltersRe = regexp.MustCompile("(\\w*)(==|!=|$=|~=|^=)(\\w*)") FilterRegex = regexp.MustCompile("(\\w*)(\\W*)(\\w*)") FilterCompletionRe = regexp.MustCompile("(\\w*)(==|!=|$=|~=|^=)(\\w*)([,]|)") )
View Source
var AnsibleValidRoleSubFolders = utils.NewSetFromSlice("tasks", "meta")
View Source
var Inventories = inventories{}
View Source
var Playbooks = playbooks{}
View Source
var Projects = projects{}
Functions ¶
func ParseFilter ¶
Types ¶
type Command ¶
type Command struct { Comment string Inventory []*Inventory Playbook *Playbook Tags []string Limit []string SkipTags []string Check bool Diff bool VaultPasswordFile string AskVaultPass bool }
func (*Command) GenerateCmd ¶
func (tpl *Command) GenerateCmd()
type Inventory ¶
type Inventory struct { AbsolutePath string RootPath *string PathTags []string Data *aini.InventoryData }
func (*Inventory) RelativePath ¶
type Play ¶
type Playbook ¶
type Playbook struct { Plays []*Play // contains filtered or unexported fields }
func (*Playbook) RelativePath ¶
type Project ¶
func (Project) FilterInventory ¶
Returns inventory that match all the conditions
func (Project) InventoryKeys ¶
Returns variables name contained in the all section of all inventory files
func (Project) InventoryValues ¶
Given a variable name returns value across multiples inventory files
func (Project) PlaybookPath ¶
func (Project) PlaybookPaths ¶
type Role ¶
type Role struct { AbsolutePath string Name string `yaml:"role"` Tasks []Task `yaml:"tasks"` Tags utils.Set `yaml:"tags"` }
func (*Role) LoadFromPath ¶
Gather inventory files LoadFromPath a Parent directory Using a recursive scan. All non inventory files are ignored ( not .ini file ) All sub parent directory added like label in the inventory
Click to show internal directories.
Click to hide internal directories.