rules_ansible
Rules
Aspects
ansible_lint_test
load("@rules_ansible//ansible:defs.bzl", "ansible_lint_test") ansible_lint_test(name, config, playbook)
A test rule for running ansible-lint
on an Ansible playbook.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
config | The ansible-lint config file to use | Label | optional | "@rules_ansible//ansible:lint_config" |
playbook | The ansible_playbook target to lint. | Label | required |
ansible_playbook
load("@rules_ansible//ansible:defs.bzl", "ansible_playbook") ansible_playbook(name, config, hosts, inventory, playbook, roles, vault)
A rule for running Ansible playbooks
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
config | The path to an Ansible config file. | Label | optional | "@rules_ansible//ansible:config" |
hosts | Ansible hosts file | Label | required | |
inventory | Ansible inventory files | List of labels | optional | [] |
playbook | The ansible playbook yaml file. | Label | required | |
roles | The source files for all ansible roles required by the playbook. | List of labels | optional | [] |
vault | Vault files to be decrypted before running | List of labels | optional | [] |
ansible_toolchain
load("@rules_ansible//ansible:defs.bzl", "ansible_toolchain") ansible_toolchain(name, ansible, ansible_core, ansible_lint)
An ansible toolchain
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
ansible | An ansible py_library target. | Label | required | |
ansible_core | An ansible-core py_library target. | Label | required | |
ansible_lint | An ansible-lint py_library target. | Label | required |
current_ansible_toolchain
load("@rules_ansible//ansible:defs.bzl", "current_ansible_toolchain") current_ansible_toolchain(name, lib)
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
lib | Which py_library within the ansible toolchain to yield providers from | String | optional | "ansible" |
ansible_lint_aspect
load("@rules_ansible//ansible:defs.bzl", "ansible_lint_aspect") ansible_lint_aspect()
An aspect for linting ansible targets.
ASPECT ATTRIBUTES
ATTRIBUTES