ansible
This module has been generated via dagger init and serves as a reference tobasic 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@d4d9694352d38da6840d72bc1755fb3ceef7077a
Entrypoint
Return Type
Ansible
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
version | String ! | "latest" | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
version | String ! | "latest" | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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)
}
containerEcho() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
stringArg | String ! | - | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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
Name | Type | Default Value | Description |
---|---|---|---|
directoryArg | Directory ! | - | No description provided |
pattern | String ! | - | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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)
}
manifest() 🔗
Manifest - configures manifest in registry. not meant to be run locally
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
version | String ! | "latest" | No description provided |
actor | Secret ! | - | GitHub actor, --token=env:GITHUB_API_TOKEN,--token=cmd:"gh auth token" |
token | Secret ! | - | GitHub API token, --token=env:GITHUB_API_TOKEN,--token=cmd:"gh auth token" |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a call \
manifest --src DIR_PATH --version string --actor env:MYSECRET --token env:MYSECRET
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)
}
@function
async def example(src: dagger.Directory, version: str, actor: dagger.Secret, token: dagger.Secret) -> str:
return await (
dag.ansible()
.manifest(src, version, actor, token)
)
@func()
async example(src: Directory, version: string, actor: Secret, token: Secret): Promise<string> {
return dag
.ansible()
.manifest(src, version, actor, token)
}
init() 🔗
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a 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)
}
build() 🔗
Build - builds the container image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
index | Integer ! | 0 | No description provided |
src | Directory ! | - | No description provided |
version | String ! | "latest" | No description provided |
invalidateCache | Boolean ! | false | No description provided |
isDev | Boolean ! | true | No description provided |
flavor | String ! | "playbook" | No description provided |
Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d4d9694352d38da6840d72bc1755fb3ceef7077a call \
build --index integer --src DIR_PATH --version string --invalidate-cache boolean --is-dev boolean --flavor string
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)
}
@function
async def example(index: int, src: dagger.Directory, version: str, invalidate_cache: bool, is_dev: bool, flavor: str) -> str:
return await (
dag.ansible()
.build(index, src, version, invalidate_cache, is_dev, flavor)
)
@func()
async example(index: number, src: Directory, version: string, invalidateCache: boolean, isDev: boolean, flavor: string): Promise<string> {
return dag
.ansible()
.build(index, src, version, invalidateCache, isDev, flavor)
}
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