Dagger
Search

docker-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/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2

Entrypoint

Return Type
DockerAnsible !
Example
dagger -m github.com/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2 call \
func (m *MyModule) Example() *dagger.DockerAnsible  {
	return dag.
			DockerAnsible()
}
@function
def example() -> dagger.DockerAnsible:
	return (
		dag.docker_ansible()
	)
@func()
example(): DockerAnsible {
	return dag
		.dockerAnsible()
}

Types

DockerAnsible 🔗

build() 🔗

Build docker-ansible images for specified OS and platforms

Return Type
[Container ! ] !
Arguments
NameTypeDefault ValueDescription
osString !-No description provided
osVerString !-No description provided
upstreamOrgString nullNo description provided
upstreamOsString nullNo description provided
upstreamOsVerString nullNo description provided
uvVersionString !"latest"No description provided
platformsString !"linux/amd64"No description provided
Example
dagger -m github.com/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2 call \
 build --os string --os-ver string --uv-version string --platforms string
func (m *MyModule) Example(os string, osVer string, uvVersion string, platforms string) []*dagger.Container  {
	return dag.
			DockerAnsible().
			Build(os, osVer, uvVersion, platforms)
}
@function
def example(os: str, os_ver: str, uv_version: str, platforms: str) -> List[dagger.Container]:
	return (
		dag.docker_ansible()
		.build(os, os_ver, uv_version, platforms)
	)
@func()
example(os: string, osVer: string, uvVersion: string, platforms: string): Container[] {
	return dag
		.dockerAnsible()
		.build(os, osVer, uvVersion, platforms)
}

genRoleFiles() 🔗

Generate GitHub Actions workflow and config files for an Ansible role

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
roleNameString !-No description provided
roleDirDirectory nullNo description provided
workflowRefString !"develop"No description provided
Example
dagger -m github.com/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2 call \
 gen-role-files --role-name string --workflow-ref string
func (m *MyModule) Example(roleName string, workflowRef string) *dagger.Directory  {
	return dag.
			DockerAnsible().
			GenRoleFiles(roleName, workflowRef)
}
@function
def example(role_name: str, workflow_ref: str) -> dagger.Directory:
	return (
		dag.docker_ansible()
		.gen_role_files(role_name, workflow_ref)
	)
@func()
example(roleName: string, workflowRef: string): Directory {
	return dag
		.dockerAnsible()
		.genRoleFiles(roleName, workflowRef)
}

publish() 🔗

Build and publish docker-ansible images to Docker Hub and GHCR

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
osString !-No description provided
osVerString !-No description provided
dockerhubUsernameString nullNo description provided
dockerhubPasswordSecret nullNo description provided
ghcrUsernameString nullNo description provided
ghcrPasswordSecret nullNo description provided
upstreamOrgString nullNo description provided
upstreamOsString nullNo description provided
upstreamOsVerString nullNo description provided
targetImageSemverString !"0.0.0"No description provided
uvVersionString !"latest"No description provided
dockerhubRegistryString !"docker.io"No description provided
dockerhubOrgString !"andrewrothstein"No description provided
dockerhubRepoString !"docker-ansible"No description provided
ghcrRegistryString !"ghcr.io"No description provided
ghcrOrgString !"andrewrothstein"No description provided
ghcrRepoString !"docker-ansible"No description provided
platformsString !"linux/amd64"No description provided
Example
dagger -m github.com/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2 call \
 publish --os string --os-ver string --target-image-semver string --uv-version string --dockerhub-registry string --dockerhub-org string --dockerhub-repo string --ghcr-registry string --ghcr-org string --ghcr-repo string --platforms string
func (m *MyModule) Example(ctx context.Context, os string, osVer string, targetImageSemver string, uvVersion string, dockerhubRegistry string, dockerhubOrg string, dockerhubRepo string, ghcrRegistry string, ghcrOrg string, ghcrRepo string, platforms string) []string  {
	return dag.
			DockerAnsible().
			Publish(ctx, os, osVer, targetImageSemver, uvVersion, dockerhubRegistry, dockerhubOrg, dockerhubRepo, ghcrRegistry, ghcrOrg, ghcrRepo, platforms)
}
@function
async def example(os: str, os_ver: str, target_image_semver: str, uv_version: str, dockerhub_registry: str, dockerhub_org: str, dockerhub_repo: str, ghcr_registry: str, ghcr_org: str, ghcr_repo: str, platforms: str) -> List[str]:
	return await (
		dag.docker_ansible()
		.publish(os, os_ver, target_image_semver, uv_version, dockerhub_registry, dockerhub_org, dockerhub_repo, ghcr_registry, ghcr_org, ghcr_repo, platforms)
	)
@func()
async example(os: string, osVer: string, targetImageSemver: string, uvVersion: string, dockerhubRegistry: string, dockerhubOrg: string, dockerhubRepo: string, ghcrRegistry: string, ghcrOrg: string, ghcrRepo: string, platforms: string): Promise<string[]> {
	return dag
		.dockerAnsible()
		.publish(os, osVer, targetImageSemver, uvVersion, dockerhubRegistry, dockerhubOrg, dockerhubRepo, ghcrRegistry, ghcrOrg, ghcrRepo, platforms)
}

testRole() 🔗

Test an Ansible role and optionally publish to a registry

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
osString !-No description provided
osVerString !-No description provided
roleNameString !"test-role"No description provided
roleDirDirectory nullNo description provided
upstreamRegistryString !"ghcr.io"No description provided
upstreamOrgString !"andrewrothstein"No description provided
upstreamRepoString !"docker-ansible"No description provided
upstreamSemverString !"0.0.0"No description provided
targetRegistryString nullNo description provided
targetOrgString nullNo description provided
targetUsernameString nullNo description provided
targetPasswordSecret nullNo description provided
targetSemverString !"0.0.0"No description provided
platformsString !"linux/amd64"No description provided
gitShaString nullNo description provided
publishLatestBoolean !falseNo description provided
Example
dagger -m github.com/andrewrothstein/docker-ansible@a7e4b001f71a5fe1f9dbdae490120dbb33e0eeb2 call \
 test-role --os string --os-ver string --role-name string --upstream-registry string --upstream-org string --upstream-repo string --upstream-semver string --target-semver string --platforms string --publish-latest boolean
func (m *MyModule) Example(ctx context.Context, os string, osVer string, roleName string, upstreamRegistry string, upstreamOrg string, upstreamRepo string, upstreamSemver string, targetSemver string, platforms string, publishLatest bool) []string  {
	return dag.
			DockerAnsible().
			TestRole(ctx, os, osVer, roleName, upstreamRegistry, upstreamOrg, upstreamRepo, upstreamSemver, targetSemver, platforms, publishLatest)
}
@function
async def example(os: str, os_ver: str, role_name: str, upstream_registry: str, upstream_org: str, upstream_repo: str, upstream_semver: str, target_semver: str, platforms: str, publish_latest: bool) -> List[str]:
	return await (
		dag.docker_ansible()
		.test_role(os, os_ver, role_name, upstream_registry, upstream_org, upstream_repo, upstream_semver, target_semver, platforms, publish_latest)
	)
@func()
async example(os: string, osVer: string, roleName: string, upstreamRegistry: string, upstreamOrg: string, upstreamRepo: string, upstreamSemver: string, targetSemver: string, platforms: string, publishLatest: boolean): Promise<string[]> {
	return dag
		.dockerAnsible()
		.testRole(os, osVer, roleName, upstreamRegistry, upstreamOrg, upstreamRepo, upstreamSemver, targetSemver, platforms, publishLatest)
}