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@946923d6c2cc0cd153ddb911d1c5af0192a85185

Entrypoint

Return Type
Ansible
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
func (m *myModule) example() *Ansible  {
	return dag.
			Ansible()
}
@function
def example() -> dag.Ansible:
	return (
		dag.ansible()
	)
@func()
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
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
 product --src DIR_PATH --version string
func (m *myModule) example(src *Directory, version string) []*AnsibleProductFormat  {
	return dag.
			Ansible().
			Product(src, version)
}
@function
def example(src: dagger.Directory, version: str) -> List[dag.AnsibleProductFormat]:
	return (
		dag.ansible()
		.product(src, version)
	)
@func()
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
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
 product-json --src DIR_PATH --version string
func (m *myModule) example(ctx context.Context, src *Directory, version string) string  {
	return dag.
			Ansible().
			ProductJson(ctx, src, version)
}
@function
async def example(src: dagger.Directory, version: str) -> str:
	return await (
		dag.ansible()
		.product_json(src, version)
	)
@func()
async example(src: Directory, version: string): Promise<string> {
	return dag
		.ansible()
		.productJson(src, version)
}

init() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
 init --src DIR_PATH
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Ansible().
			Init(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.ansible()
		.init(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.ansible()
		.init(src)
}

containerEcho() 🔗

Returns a container that echoes whatever string argument is provided

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
stringArgString !-No description provided
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
 container-echo --string-arg string
func (m *myModule) example(stringArg string) *Container  {
	return dag.
			Ansible().
			ContainerEcho(stringArg)
}
@function
def example(string_arg: str) -> dagger.Container:
	return (
		dag.ansible()
		.container_echo(string_arg)
	)
@func()
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
dagger -m github.com/bradfordwagner/dagger-modules/ansible@946923d6c2cc0cd153ddb911d1c5af0192a85185 call \
 grep-dir --directory-arg DIR_PATH --pattern string
func (m *myModule) example(ctx context.Context, directoryArg *Directory, pattern string) string  {
	return dag.
			Ansible().
			GrepDir(ctx, directoryArg, pattern)
}
@function
async def example(directory_arg: dagger.Directory, pattern: str) -> str:
	return await (
		dag.ansible()
		.grep_dir(directory_arg, pattern)
	)
@func()
async example(directoryArg: Directory, pattern: string): Promise<string> {
	return dag
		.ansible()
		.grepDir(directoryArg, pattern)
}

ProductFormat 🔗

arch() 🔗

Return Type
String !
Example
Function AnsibleProductFormat.arch is not accessible from the ansible module
Function AnsibleProductFormat.arch is not accessible from the ansible module
Function AnsibleProductFormat.arch is not accessible from the ansible module
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
Function AnsibleProductFormat.index is not accessible from the ansible module
Function AnsibleProductFormat.index is not accessible from the ansible module
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
Function AnsibleProductFormat.os is not accessible from the ansible module
Function AnsibleProductFormat.os is not accessible from the ansible module
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
Function AnsibleProductFormat.runner is not accessible from the ansible module
Function AnsibleProductFormat.runner is not accessible from the ansible module
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
Function AnsibleProductFormat.targetImage is not accessible from the ansible module
Function AnsibleProductFormat.targetImage is not accessible from the ansible module
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
Function AnsibleProductFormat.upstreamImage is not accessible from the ansible module
Function AnsibleProductFormat.upstreamImage is not accessible from the ansible module
Function AnsibleProductFormat.upstreamImage is not accessible from the ansible module