awx.awx.project – create, update, or destroy Automation Platform Controller projects
Note
This plugin is part of the awx.awx collection (version 19.4.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.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
allow_override boolean |
| Allow changing the SCM branch or revision in a job template that uses this project. aliases: scm_allow_override |
controller_config_file path | Path to the controller config file. If provided, the other locations for config files will not be considered. aliases: tower_config_file | |
controller_host string | URL to your Automation Platform Controller instance. If value not set, will try environment variable CONTROLLER_HOST and then config filesIf value not specified by any means, the value of 127.0.0.1 will be usedaliases: tower_host | |
controller_oauthtoken raw added in 3.7.0 of awx.awx | 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 CONTROLLER_OAUTH_TOKEN and then config filesaliases: tower_oauthtoken | |
controller_password string | Password for your controller instance. If value not set, will try environment variable CONTROLLER_PASSWORD and then config filesaliases: tower_password | |
controller_username string | Username for your controller instance. If value not set, will try environment variable CONTROLLER_USERNAME and then config filesaliases: tower_username | |
copy_from string | 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. | |
credential string | Name of the credential to use with this SCM resource. aliases: scm_credential | |
custom_virtualenv string | 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_environment string | Default Execution Environment to use for jobs relating to the project. | |
description string | Description to use for the project. | |
interval float | Default: 1 | The interval to request an update from the controller. Requires wait. |
local_path string | The server playbook directory for manual projects. | |
name string / required | Name to use for the project. | |
notification_templates_error list / elements=string | list of notifications to send on error | |
notification_templates_started list / elements=string | list of notifications to send on start | |
notification_templates_success list / elements=string | list of notifications to send on success | |
organization string | Name of organization for project. | |
scm_branch string | Default: "" | The branch to use for the SCM resource. |
scm_clean boolean |
| Remove local modifications before updating. |
scm_delete_on_update boolean |
| Remove the repository completely before updating. |
scm_refspec string | Default: "" | The refspec to use for the SCM resource. |
scm_track_submodules boolean |
| Track submodules latest commit on specified branch. |
scm_type string |
| Type of SCM resource. |
scm_update_cache_timeout integer | Default: 0 | 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. |
scm_update_on_launch boolean |
| Before an update to the local repository before launching a job with this project. |
scm_url string | URL of SCM resource. | |
state string |
| Desired state of the resource. |
timeout integer | Default: 0 | 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 aliases: job_timeout |
update_project boolean |
| Force project to update after changes. Used in conjunction with wait, interval, and timeout. |
validate_certs boolean |
| Whether to allow insecure connections to AWX. If no , SSL certificates will not be validated.This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable CONTROLLER_VERIFY_SSL and then config filesaliases: tower_verify_ssl |
wait boolean |
| 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 |
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
Authors
- Wayne Witzel III (@wwitzel3)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/awx/awx/project_module.html