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@d149c627b8d8205c2d762191b13649fb7fabeccbEntrypoint
Return Type
Ansible Example
dagger -m github.com/bradfordwagner/dagger-modules/ansible@d149c627b8d8205c2d762191b13649fb7fabeccb call \
func (m *MyModule) Example() *dagger.Ansible {
return dag.
Ansible()
}@function
def example() -> dagger.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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
product --src DIR_PATH --version stringfunc (m *MyModule) Example(src *dagger.Directory, version string) []*dagger.AnsibleProductFormat {
return dag.
Ansible().
Product(src, version)
}@function
def example(src: dagger.Directory, version: str) -> List[dagger.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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
product-json --src DIR_PATH --version stringfunc (m *MyModule) Example(ctx context.Context, src *dagger.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)
}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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
build --index integer --src DIR_PATH --version string --invalidate-cache boolean --is-dev boolean --flavor stringfunc (m *MyModule) Example(ctx context.Context, index int, src *dagger.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)
}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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
container-echo --string-arg stringfunc (m *MyModule) Example(stringArg string) *dagger.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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
grep-dir --directory-arg DIR_PATH --pattern stringfunc (m *MyModule) Example(ctx context.Context, directoryArg *dagger.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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
manifest --src DIR_PATH --version string --actor env:MYSECRET --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory, version string, actor *dagger.Secret, token *dagger.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@d149c627b8d8205c2d762191b13649fb7fabeccb call \
init --src DIR_PATHfunc (m *MyModule) Example(ctx context.Context, src *dagger.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)
}ProductFormat 🔗
arch() 🔗
Return Type
String ! Example
Function AnsibleProductFormat.arch is not accessible from the ansible moduleFunction AnsibleProductFormat.arch is not accessible from the ansible moduleFunction AnsibleProductFormat.arch is not accessible from the ansible moduleFunction AnsibleProductFormat.arch is not accessible from the ansible moduleindex() 🔗
Return Type
Integer ! Example
Function AnsibleProductFormat.index is not accessible from the ansible moduleFunction AnsibleProductFormat.index is not accessible from the ansible moduleFunction AnsibleProductFormat.index is not accessible from the ansible moduleFunction AnsibleProductFormat.index is not accessible from the ansible moduleos() 🔗
Return Type
String ! Example
Function AnsibleProductFormat.os is not accessible from the ansible moduleFunction AnsibleProductFormat.os is not accessible from the ansible moduleFunction AnsibleProductFormat.os is not accessible from the ansible moduleFunction AnsibleProductFormat.os is not accessible from the ansible modulerunner() 🔗
Return Type
String ! Example
Function AnsibleProductFormat.runner is not accessible from the ansible moduleFunction AnsibleProductFormat.runner is not accessible from the ansible moduleFunction AnsibleProductFormat.runner is not accessible from the ansible moduleFunction AnsibleProductFormat.runner is not accessible from the ansible moduletargetImage() 🔗
without architecture suffix
Return Type
String ! Example
Function AnsibleProductFormat.targetImage is not accessible from the ansible moduleFunction AnsibleProductFormat.targetImage is not accessible from the ansible moduleFunction AnsibleProductFormat.targetImage is not accessible from the ansible moduleFunction AnsibleProductFormat.targetImage is not accessible from the ansible moduleupstreamImage() 🔗
Return Type
String ! Example
Function AnsibleProductFormat.upstreamImage is not accessible from the ansible moduleFunction AnsibleProductFormat.upstreamImage is not accessible from the ansible moduleFunction AnsibleProductFormat.upstreamImage is not accessible from the ansible moduleFunction AnsibleProductFormat.upstreamImage is not accessible from the ansible module