|
|
|
@ -1,9 +1,8 @@
|
|
|
|
|
#!/usr/bin/python
|
|
|
|
|
# coding: utf-8 -*-
|
|
|
|
|
#
|
|
|
|
|
# (c) 2018, Adrien Fleury <fleu42@gmail.com>
|
|
|
|
|
# GNU General Public License v3.0+
|
|
|
|
|
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
|
|
|
|
|
# Copyright: (c) 2018, Adrien Fleury <fleu42@gmail.com>
|
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
|
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
|
__metaclass__ = type
|
|
|
|
@ -31,8 +30,6 @@ options:
|
|
|
|
|
description:
|
|
|
|
|
description:
|
|
|
|
|
- The description to use for the inventory source.
|
|
|
|
|
required: False
|
|
|
|
|
default: null
|
|
|
|
|
inventory:
|
|
|
|
|
description:
|
|
|
|
|
- The inventory the source is linked to.
|
|
|
|
@ -58,7 +55,6 @@ options:
|
|
|
|
|
credential:
|
|
|
|
|
description:
|
|
|
|
|
- Credential to use to retrieve the inventory from.
|
|
|
|
|
required: False
|
|
|
|
|
source_vars:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
@ -66,24 +62,20 @@ options:
|
|
|
|
|
file. For example with Openstack, specifying *private: false* would
|
|
|
|
|
change the output of the openstack.py script. It has to be YAML or
|
|
|
|
|
JSON.
|
|
|
|
|
required: False
|
|
|
|
|
timeout:
|
|
|
|
|
description:
|
|
|
|
|
- Number in seconds after which the Tower API methods will time out.
|
|
|
|
|
source_project:
|
|
|
|
|
description:
|
|
|
|
|
- Use a *project* as a source for the *inventory*.
|
|
|
|
|
required: False
|
|
|
|
|
source_path:
|
|
|
|
|
description:
|
|
|
|
|
- Path to the file to use as a source in the selected *project*.
|
|
|
|
|
required: False
|
|
|
|
|
update_on_project_update:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
|
That parameter will sync the inventory when the project is synced. It
|
|
|
|
|
can only be used with a SCM source.
|
|
|
|
|
required: False
|
|
|
|
|
type: bool
|
|
|
|
|
source_regions:
|
|
|
|
|
description:
|
|
|
|
@ -91,27 +83,23 @@ options:
|
|
|
|
|
List of regions for your cloud provider. You can include multiple all
|
|
|
|
|
regions. Only Hosts associated with the selected regions will be
|
|
|
|
|
updated. Refer to Ansible Tower documentation for more detail.
|
|
|
|
|
required: False
|
|
|
|
|
instance_filters:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
|
Provide a comma-separated list of filter expressions. Hosts are
|
|
|
|
|
imported when all of the filters match. Refer to Ansible Tower
|
|
|
|
|
documentation for more detail.
|
|
|
|
|
required: False
|
|
|
|
|
group_by:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
|
Specify which groups to create automatically. Group names will be
|
|
|
|
|
created similar to the options selected. If blank, all groups above
|
|
|
|
|
are created. Refer to Ansible Tower documentation for more detail.
|
|
|
|
|
required: False
|
|
|
|
|
source_script:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
|
The source custom script to use to build the inventory. It needs to
|
|
|
|
|
exist.
|
|
|
|
|
required: False
|
|
|
|
|
overwrite:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
@ -123,7 +111,6 @@ options:
|
|
|
|
|
left in the "all" default group for the inventory. When not checked,
|
|
|
|
|
local child hosts and groups not found on the external source will
|
|
|
|
|
remain untouched by the inventory update process.
|
|
|
|
|
required: False
|
|
|
|
|
type: bool
|
|
|
|
|
overwrite_vars:
|
|
|
|
|
description:
|
|
|
|
@ -132,14 +119,12 @@ options:
|
|
|
|
|
and replaced by those found on the external source. When not checked,
|
|
|
|
|
a merge will be performed, combining local variables with those found
|
|
|
|
|
on the external source.
|
|
|
|
|
required: False
|
|
|
|
|
type: bool
|
|
|
|
|
update_on_launch:
|
|
|
|
|
description:
|
|
|
|
|
- >-
|
|
|
|
|
Each time a job runs using this inventory, refresh the inventory from
|
|
|
|
|
the selected source before executing job tasks.
|
|
|
|
|
required: False
|
|
|
|
|
type: bool
|
|
|
|
|
update_cache_timeout:
|
|
|
|
|
description:
|
|
|
|
@ -148,17 +133,14 @@ options:
|
|
|
|
|
job runs and callbacks the task system will evaluate the timestamp of
|
|
|
|
|
the latest sync. If it is older than Cache Timeout, it is not
|
|
|
|
|
considered current, and a new inventory sync will be performed.
|
|
|
|
|
required: False
|
|
|
|
|
state:
|
|
|
|
|
description:
|
|
|
|
|
- Desired state of the resource.
|
|
|
|
|
required: False
|
|
|
|
|
default: "present"
|
|
|
|
|
choices: ["present", "absent"]
|
|
|
|
|
tower_verify_ssl:
|
|
|
|
|
description:
|
|
|
|
|
- Tower option to avoid certificates check.
|
|
|
|
|
required: False
|
|
|
|
|
type: bool
|
|
|
|
|
extends_documentation_fragment: tower
|
|
|
|
|
'''
|
|
|
|
|