awx.awx.project module – create, update, or destroy Automation Platform Controller projects
Note
This module is part of the awx.awx collection (version 23.9.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install awx.awx
.
To use it in a playbook, specify: awx.awx.project
.
Synopsis
Create, update, or destroy Automation Platform Controller projects. See https://www.ansible.com/tower for an overview.
Aliases: tower_project
Parameters
Parameter |
Comments |
---|---|
Allow changing the SCM branch or revision in a job template that uses this project. Choices:
|
|
Path to the controller config file. If provided, the other locations for config files will not be considered. |
|
URL to your Automation Platform Controller instance. If value not set, will try environment variable If value not specified by any means, the value of |
|
The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable |
|
Password for your controller instance. If value not set, will try environment variable |
|
Username for your controller instance. If value not set, will try environment variable |
|
Name or id to copy the project from. This will copy an existing project and change any parameters supplied. The new project name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple projects share the same name. |
|
Name, ID, or named URL of the credential to use with this SCM resource. |
|
Local absolute file path containing a custom Python virtualenv to use. Only compatible with older versions of AWX/Tower Deprecated, will be removed in the future |
|
Default Execution Environment name, ID, or named URL to use for jobs relating to the project. |
|
Description to use for the project. |
|
The interval to request an update from the controller. Requires wait. Default: |
|
The server playbook directory for manual projects. |
|
Name to use for the project. |
|
Setting this option will change the existing name (looked up via the name field. |
|
list of notifications to send on error |
|
list of notifications to send on start |
|
list of notifications to send on success |
|
Name, ID, or named URL of organization for the project. |
|
Specify the timeout Ansible should use in requests to the controller host. Defaults to 10s, but this is handled by the shared module_utils code |
|
The branch to use for the SCM resource. |
|
Remove local modifications before updating. Choices:
|
|
Remove the repository completely before updating. Choices:
|
|
The refspec to use for the SCM resource. |
|
Track submodules latest commit on specified branch. Choices:
|
|
Type of SCM resource. Choices:
|
|
Cache Timeout to cache prior project syncs for a certain number of seconds. Only valid if scm_update_on_launch is to True, otherwise ignored. |
|
Perform an update to the local repository before launching a job with this project. Choices:
|
|
URL of SCM resource. |
|
Name, ID, or named URL of the credential to use for signature validation. If signature validation credential is provided, signature validation will be enabled. |
|
Desired state of the resource. Choices:
|
|
The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout. If waiting for the project to update this will abort after this amount of seconds |
|
Force project to update after changes. Used in conjunction with wait, interval, and timeout. Choices:
|
|
Whether to allow insecure connections to AWX. If This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable Choices:
|
|
Provides option (True by default) to wait for completed project sync before returning Can assure playbook files are populated so that job templates that rely on the project may be successfully created Choices:
|
Notes
Note
If no config_file is provided we will attempt to use the tower-cli library defaults to find your host information.
config_file should be in the following format host=hostname username=username password=password
Examples
- name: Add project
project:
name: "Foo"
description: "Foo bar project"
organization: "test"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add Project with cache timeout
project:
name: "Foo"
description: "Foo bar project"
organization: "test"
scm_update_on_launch: True
scm_update_cache_timeout: 60
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Copy project
project:
name: copy
copy_from: test
description: Foo copy project
organization: Foo
state: present