summaryrefslogtreecommitdiffstats
path: root/awx_collection/README.md
diff options
context:
space:
mode:
authorAlanCoding <arominge@redhat.com>2020-04-14 16:58:40 +0200
committerAlanCoding <arominge@redhat.com>2020-04-14 18:06:26 +0200
commita79f2ff07a119ac68a8271ece6c76c9afa7264dc (patch)
treea4be3c1fbf28355910138d8169637cf0f03ad69e /awx_collection/README.md
parentMerge pull request #6697 from chrismeyersfsu/fix-collection_tests (diff)
downloadawx-a79f2ff07a119ac68a8271ece6c76c9afa7264dc.tar.xz
awx-a79f2ff07a119ac68a8271ece6c76c9afa7264dc.zip
Update AWX collection docs for release 11.0.0
Diffstat (limited to 'awx_collection/README.md')
-rw-r--r--awx_collection/README.md63
1 files changed, 36 insertions, 27 deletions
diff --git a/awx_collection/README.md b/awx_collection/README.md
index 70d682660e..b7b536e093 100644
--- a/awx_collection/README.md
+++ b/awx_collection/README.md
@@ -3,9 +3,10 @@
This Ansible collection allows for easy interaction with an AWX or Ansible Tower
server via Ansible playbooks.
-The previous home for this collection was in https://github.com/ansible/ansible
-inside the folder `lib/ansible/modules/web_infrastructure/ansible_tower`
-as well as other folders for the inventory plugin, module utils, and
+This source for this collection lives in the `awx_collection` folder inside of the
+AWX source.
+The previous home for this collection was inside the folder [lib/ansible/modules/web_infrastructure/ansible_tower](https://github.com/ansible/ansible/tree/stable-2.9/lib/ansible/modules/web_infrastructure/ansible_tower) in the Ansible repo,
+as well as other places for the inventory plugin, module utils, and
doc fragment.
## Building and Installing
@@ -19,23 +20,42 @@ Installing the `tar.gz` involves no special instructions.
## Running
-Modules in this collection may have any of the following python requirements:
+Non-deprecated modules in this collection have no python requirements, but
+may require the official [AWX CLI](https://docs.ansible.com/ansible-tower/latest/html/towercli/index.html)
+in the future. The `DOCUMENTATION` for each module will report this.
- - the official [AWX CLI](https://docs.ansible.com/ansible-tower/latest/html/towercli/index.html)
- - the deprecated `tower-cli` [PyPI](https://pypi.org/project/ansible-tower-cli/)
- - no requirements
+You can specify authentication by a combination of either:
+ - host, username, password
+ - host, OAuth2 token
-See requirements in the `DOCUMENTATION` string specific to each module.
+The OAuth2 token is the preferred method. You can obtain a token via the
+AWX CLI [login](https://docs.ansible.com/ansible-tower/latest/html/towercli/reference.html#awx-login)
+command.
+
+These can be specified via:
+ - environment variables (most useful when running against localhost)
+ - direct module parameters
+ - a config file path specified by the `tower_config_file` parameter
+ - a config file at `/etc/tower/tower_cli.cfg`
+ - a config file at `~/.tower_cli.cfg`
+
+Config file syntax looks like this:
+
+```
+[general]
+host = https://localhost:8043
+verify_ssl = true
+oauth_token = LEdCpKVKc4znzffcpQL5vLG8oyeku6
+```
## Release and Upgrade Notes
-The release 7.0.0 of the `awx.awx` collection is intended to be identical
-to the content prior to the migration, aside from changes necessary to
-have it function as a collection.
+Notable releases of the `awx.awx` collection:
+ - 7.0.0 is intended to be identical to the content prior to the migration, aside from changes necessary to function as a collection
+ - 11.0.0 has no non-deprecated modules that depend on the deprecated `tower-cli` [PyPI](https://pypi.org/project/ansible-tower-cli/)
The following notes are changes that may require changes to playbooks:
-
- When a project is created, it will wait for the update/sync to finish by default; this can be turned off with the `wait` parameter, if desired.
- Creating a "scan" type job template is no longer supported.
- Specifying a custom certificate via the `TOWER_CERTIFICATE` environment variable no longer works.
@@ -60,7 +80,7 @@ Tests to verify compatibility with the most recent AWX code are in `awx_collecti
These can be ran by `make test_collection` in the development container.
To run outside of the development container, or to run against
-Ansible or `tower-cli` source, set up a working environment:
+Ansible source, set up a working environment:
```
mkvirtualenv my_new_venv
@@ -69,28 +89,17 @@ pip install -r requirements/requirements.txt -r requirements/requirements_dev.tx
make clean-api
pip install -e <path to your Ansible>
pip install -e .
+pip install -e awxkit
py.test awx_collection/test/awx/
```
-If you do not install tower-cli, it will skip tests for modules that require it.
-
## Running Integration Tests
The integration tests require a virtualenv with `ansible` >= 2.9 and `tower_cli`.
The collection must first be installed, which can be done using `make install_collection`.
-You also need a configuration file at `~/.tower_cli.cfg` or
-`/etc/tower/tower_cli.cfg` with the credentials for accessing tower. This can
-be populated using `tower-cli`:
-
-```
-tower-cli config host $HOST
-tower-cli config username $USERNAME
-tower-cli config password $PASSWORD
-# This tells the tower-cli not to veriffy the ssl certs in the tower, if your tower has good certs you should leave this to true
-tower-cli config verify_ssl false
-```
+You also need a configuration file, as described in the running section.
-Finally you can run the tests:
+Run the tests:
```
# ansible-test must be run from the directory in which the collection is installed