Dagger
Search

ansible

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/bradfordwagner/dagger-modules/ansible@8234c551b10c4488b401b1af37d92164ae681aef

Entrypoint

Return Type
Ansible
Example
func (m *myModule) example() *Ansible  {
	return dag.
			Ansible()
}

Types

Ansible 🔗

product() 🔗

Product returns the cartesian product of all builds this is used to explode the builds

Return Type
[ProductFormat ! ] !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
versionString !"latest"No description provided
Example
func (m *myModule) example(src *Directory, version string) []*AnsibleProductFormat  {
	return dag.
			Ansible().
			Product(src, version)
}

productJson() 🔗

ProductJson returns the cartesian product of all builds as a json string, used for github actions matrix

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
versionString !"latest"No description provided
Example
func (m *myModule) example(ctx context.Context, src *Directory, version string) string  {
	return dag.
			Ansible().
			ProductJson(ctx, src, version)
}

build() 🔗

Build - builds the container image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
indexInteger !0No description provided
srcDirectory !-No description provided
versionString !"latest"No description provided
invalidateCacheBoolean !falseNo description provided
isDevBoolean !trueNo description provided
flavorString !"playbook"No description provided
Example
func (m *myModule) example(ctx context.Context, index int, src *Directory, version string, invalidateCache bool, isDev bool, flavor string) string  {
	return dag.
			Ansible().
			Build(ctx, index, src, version, invalidateCache, isDev, flavor)
}

containerEcho() 🔗

Returns a container that echoes whatever string argument is provided

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
stringArgString !-No description provided
Example
func (m *myModule) example(stringArg string) *Container  {
	return dag.
			Ansible().
			ContainerEcho(stringArg)
}

grepDir() 🔗

Returns lines that match a pattern in the files of the provided Directory

Return Type
String !
Arguments
NameTypeDefault ValueDescription
directoryArgDirectory !-No description provided
patternString !-No description provided
Example
func (m *myModule) example(ctx context.Context, directoryArg *Directory, pattern string) string  {
	return dag.
			Ansible().
			GrepDir(ctx, directoryArg, pattern)
}

manifest() 🔗

Manifest - configures manifest in registry. not meant to be run locally

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
versionString !"latest"No description provided
actorSecret !-GitHub actor, --token=env:GITHUB_API_TOKEN,--token=cmd:"gh auth token"
tokenSecret !-GitHub API token, --token=env:GITHUB_API_TOKEN,--token=cmd:"gh auth token"
Example
func (m *myModule) example(ctx context.Context, src *Directory, version string, actor *Secret, token *Secret) string  {
	return dag.
			Ansible().
			Manifest(ctx, src, version, actor, token)
}

init() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Ansible().
			Init(ctx, src)
}

ProductFormat 🔗

arch() 🔗

Return Type
String !
Example
Function AnsibleProductFormat.arch is not accessible from the ansible module

index() 🔗

Return Type
Integer !
Example
Function AnsibleProductFormat.index is not accessible from the ansible module

os() 🔗

Return Type
String !
Example
Function AnsibleProductFormat.os is not accessible from the ansible module

runner() 🔗

Return Type
String !
Example
Function AnsibleProductFormat.runner is not accessible from the ansible module

targetImage() 🔗

without architecture suffix

Return Type
String !
Example
Function AnsibleProductFormat.targetImage is not accessible from the ansible module

upstreamImage() 🔗

Return Type
String !
Example
Function AnsibleProductFormat.upstreamImage is not accessible from the ansible module