314 Commits

Author SHA1 Message Date
Ryan Petrello
18f254fc28
Merge pull request #769 from rbywater/feature/cloudformssuffix
Add ability to append suffix to host names for Cloudforms Inventory
2018-01-17 11:43:10 -05:00
Richard Bywater
b8c76301de Add validation to ensure leading fullstop for suffix 2018-01-17 13:20:59 +13:00
Richard Bywater
b5db652050 Clarify that leading fullstop needed 2018-01-14 14:05:34 +13:00
Ryan Petrello
2691e1d707
make the fact caching plugin fail more gracefully for large payloads
related: https://github.com/ansible/ansible/pull/34424
2018-01-04 11:33:47 -05:00
Matthew Jones
9dbcc5934e
Merge remote-tracking branch 'tower/release_3.2.2' into devel 2017-12-13 12:25:47 -05:00
Richard Bywater
9b05a41eec Add ability to append suffix to host names for Cloudforms Inventory
Allows for use of a suffix that will be appended to host names returned
from Cloudforms API if that suffix is not present.

For example with a suffix of 'example.org', the following results would
be shown for a particular Cloudforms host name:
someexample -> someexample.example.org
someexample.example.org -> someexample.example.org

The main use-case for this is, when one Inventory Source is returning
names that have a FQDN name whilst others are returning a shortname, to
ensure that the hosts in an inventory aren't effectively duplicated.
2017-12-05 14:47:33 +13:00
AlanCoding
67867cf0c8
flake8: comply with new E722 rule 2017-12-01 12:16:44 -05:00
Matthew Jones
8a65c6e1c8
Present the tower inventory sync failure in a better way
This allows it to be handled better by ansible 2.4+
2017-11-16 12:59:12 -05:00
Matthew Jones
89a05e9bbc
Handle json decoder errors from tower inventory source 2017-11-06 14:15:53 -05:00
Matthew Jones
85be3c7692
Align inventory variables with Ansible modules 2017-10-27 08:12:14 -04:00
Matthew Jones
5f3ebc26e0
Adding license checks for Tower inventory source
* For Tower the license must match between the source and destination
* For AWX the check is disabled
* Hosts imported from another Tower don't count against your license
  in the local Tower
* Fix up some issues with enablement
* Prevent slashes from being used in the instance filter
* Add &all=1 filter to make sure we pick up all hosts
2017-10-27 08:12:14 -04:00
Matthew Jones
d282966aa1
Use towervars to enable turning on remote tracking vars on Tower src
* This allows the local Tower to track enabled state and unique
  instance id for each host imported from the remote Tower
2017-10-27 08:12:14 -04:00
Matthew Jones
fdc7f58bb4
Support passing instance filters to tower inventory src
* Switch ignore ssl errors to default on
* Application inventory source defaults for Tower src
2017-10-26 13:51:05 -04:00
Matthew Jones
6c597ad165
Adding initial credential and invsrc for Tower
* New credential type for Tower
* Inventory source definitions and migrations for Tower
* Initial Tower inventory source script
2017-10-26 13:51:05 -04:00
AlanCoding
90f63774f4
flake8: comply with new E722 rule 2017-10-23 14:36:48 -04:00
Ryan Petrello
ea683344f5
remove support for job-scoped auth tokens
When Jobs and Adhoc Commands are launched, awx uses a job-scoped auth
token to dynamically fetch inventory via the awx REST API; this process
is complicated, hard to debug, and likely won't work going forward with
oauth2-based tokens in awx

see: https://github.com/ansible/awx/issues/21
2017-10-18 17:11:47 -04:00
AlanCoding
f03b40aa50
enforce max line length of 160 characters 2017-10-11 12:38:39 -04:00
Matthew Jones
6fa283fc98
Merge branch 'release_3.2.0' into devel
* release_3.2.0: (66 commits)
  fix workflow maker lookup issues
  adding extra logic check for ansible_facts in smart search
  adding "admin_role" as a default query param for insights cred lookup
  changing insights cred lookup to not use hard coded cred type
  fix rounding of capacity percentage
  Catch potential unicode errors when looking up addrinfo
  fixing typo with adding query params for instance groups modal
  move percentage capacitty to variable
  Add unit test for inventory_sources_already_updated
  Check for inventory sources already updated from start args
  Fixed inventory completed jobs pagination bug by setting default page size
  Remove the logic blocking dependent inventory updates on callbacks
  fix instance group percentage
  Remove host-filter-modal import
  Fix partial hover highlight of host filter modal row
  Removed leading slash on basePath
  Fixed host nested groups pagination
  Added trailing slash to basePath
  Fixed nested groups pagination
  Fixed host_filter searching related fields
  ...
2017-10-10 16:09:43 -04:00
AlanCoding
e66a1002ee
fix equation for isolated instance capacity 2017-10-10 14:58:09 -04:00
Ryan Petrello
74f2509482 support ovirt4 as a built-in inventory source
see: https://github.com/ansible/ansible-tower/issues/6522
2017-10-10 14:38:44 -04:00
Matthew Jones
64415872a0
Merge branch 'release_3.2.0' into devel 2017-09-18 10:55:45 -04:00
Ryan Petrello
4dd265633e
remove legacy azure inventory script
see: ansible/ansible-tower#7629
2017-09-18 10:41:49 -04:00
Ryan Petrello
2f14dc7e5d Merge pull request #388 from ryanpetrello/fix-7470
bump azurerm dependencies to support Ansible 2.4
2017-09-11 07:45:51 -07:00
Patrick Uiterwijk
3816791aa4 Use distutils find_executable instead of which
Fixes: #44

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-09-08 01:49:50 +00:00
Ryan Petrello
768c7ba3dc
bump azurerm dependencies to support Ansible 2.4
see: https://github.com/ansible/ansible-tower/issues/7470
2017-09-01 15:15:53 -04:00
Ryan Fitzpatrick
5cbdadc3e8 Fix typo in scan_packages plugin 2017-08-31 13:17:30 -04:00
Matthew Jones
2b1bcc23be Merge branch 'purge_ansible_name' into release_3.2.0
* purge_ansible_name:
  Remove ansible reference from dev PKG-INFO
  Add back in PRIVILEGE_ESCALATION_METHODS inadvertantly removed
  Add awx_ and AWX_ environment vars and extra_vars alongside Tower
  Refactor some tower periodic tasks to label as awx
  Refactor Notification backend for tower -> awx
  Refactor fact cache plugin from tower -> awx
  Rename tower display plugins to awx display
  Mass rename from ansible_(awx|tower) -> (awx|tower)
2017-07-26 23:06:55 -04:00
Matthew Jones
cc0802c87e Refactor fact cache plugin from tower -> awx 2017-07-26 13:33:30 -04:00
Matthew Jones
d4b1a07495 Rename tower display plugins to awx display 2017-07-26 13:33:30 -04:00
Chris Meyers
ef055110f5 handle unicode host names in fact cache 2017-07-26 12:41:13 -04:00
Ryan Petrello
e29492a259 more tower -> awx for task execution and isolated tooling 2017-07-25 10:36:06 -04:00
Alan Rominger
ca2671f17e Merge pull request #2 from AlanCoding/ansible_inv_update
Pull upstream changes for ansible-inventory backport
2017-07-24 16:34:12 -04:00
Ryan Petrello
8ce1421c6a fix tower-expect -> awx-expect for isolated tower builds 2017-07-24 16:03:58 -04:00
AlanCoding
4aa332d7e1 pull upstream changes for ansible-inventory backport 2017-07-24 15:25:54 -04:00
Chris Meyers
e1a24d9849 structure scan modules as dicts not arrays 2017-07-11 14:14:48 -04:00
Chris Meyers
1331865749 take into account memcached key restrictions
* Keys can't contain spaces or control characters
2017-07-05 15:39:04 -04:00
Chris Meyers
3d4f8b0074 support clear_facts 2017-07-05 10:33:36 -04:00
Chris Meyers
eda0679eb3 Revert "support clear_facts"
This reverts commit e5432c231d1ab38807c8be10133d35ede237a519.
2017-07-05 10:32:13 -04:00
Chris Meyers
06edb6774a support clear_facts 2017-07-05 10:26:49 -04:00
Ryan Petrello
413e8c3bc9 isolated nodes should report their awx version in their heartbeat
see: #6810
2017-06-29 16:55:11 -04:00
Ryan Petrello
405c01a847 more isolated production tinkering
see: #5903
see: #6507
2017-06-29 09:35:26 -04:00
Chris Meyers
12cdbcf8b5 adds per-host timeout 2017-06-21 13:45:27 -04:00
Chris Meyers
817dbe8d33 add fact modified time 2017-06-21 13:45:27 -04:00
Chris Meyers
626e2d1c9b tower fact cache implementation
* Tower now injects facts into jobs via memcached for use by Ansible
playbooks. On the Ansible side, this is accomplished by the existing
mechanism, an Ansible Fact Cache Plugin + memcached. On the Tower side,
memcached is leveraged heavily.
2017-06-21 13:44:08 -04:00
Ryan Petrello
422950f45d Support for executing job and adhoc commands on isolated Tower nodes (#6524) 2017-06-14 11:47:30 -04:00
Chris Meyers
ca1eb28d1f don't assume insights id is a uuid 2017-05-25 17:52:46 -04:00
Chris Meyers
eb27233e5c clear insights system id if not found
* Host previously found to have an insights system id that then later
are found to not have an insights system id, have their system id
cleared.
2017-05-12 12:00:30 -04:00
Chris Meyers
3cdc332497 rename insight tracking field; handle duplicate
* rename from insights_machine_id to insights_system_id
* gracefully handle duplicate insights machine id's
2017-05-12 10:47:49 -04:00
Chris Meyers
b9b0b29d97 associate insights machine id w/ host on fact scan
* Add inisghts fact scan module
* Update fact scan playbook to call new insight fact scan module
* JT run w/ store_facts=True will save scanned facts. We "skim" the
machine_id fact from Insights fact scans and associate it with the host
that the fact scan came from.
2017-05-11 11:20:52 -04:00
Aaron Tan
cfb633e8a6 Dependency Updates
* Dynamic Inventory Source
Template against ansible 2.3 dynamic inventory sources.
The major change is removal of `rax.py`. Most upstream scripts except
`foreman.py` has quite trivial coding style changes, or minor functional
extensions  that does not affect Tower inventory update runs.
`foreman.py`, on the other hand, went through quite a major refactoring,
but functionalities stay the same.

Major python dependency updates include apache-libcloud (1.3.0 -->
2.0.0), boto (2.45.0 --> 2.46.1) and shade (1.19.0 --> 1.20.0). Minor
python dependency updates include indirect updates via `pip-compile`,
which are determined by base dependencies.

Some minor `task.py` extensions:
 - `.ini` file for ec2 has one more field `stack_filter=False`, which
   reveals changes in `ec2.py`.
 - `.ini` file for cloudforms will catch these four options from
   `source_vars_dict` of inventory update: `'version', 'purge_actions',
   'clean_group_keys', 'nest_tags'`. These four options have always been
   available in `cloudforms.py` but `cloudforms.ini.example` has not
   mentioned them until the latest version. For consistency with upstream
   docs, we should make these fields available for tower user to customize.
 - YAML file of openstack will catch ansible options `use_hostnames`,
   `expand_hostvars` and `fail_on_errors` from `source_vars_dict` of
   inventory update as a response to issue #6075.

* Remove Rackspace support
Supports of Rackspace as both a dynamic inventory source and a cloud
credential are fully removed. Data migrations have been added to support
arbitrary credential types feature and delete rackspace inventory
sources.

Note also requirement `jsonschema` has been moved from
`requirements.txt` to `requirements.in` as a primary dependency to
reflect it's usage in `/main/fields.py`.

Connected issue: #6080.

* `pexpect` major update
`pexpect` stands at the very core of our task system and underwent a
major update from 3.1 to 4.2.1. Although verified during devel, please
still be mindful of any suspicious issues on celery side even after this
PR gets merged.

* Miscellaneous
 - requests now explicitly declared in `requirements.in` at version 2.11.1
   in response to upstream issue
 - celery: 3.1.17 -> 3.1.25
 - django-extensions: 1.7.4 -> 1.7.8
 - django-polymorphic: 0.7.2 -> 1.2
 - django-split-settings: 0.2.2 -> 0.2.5
 - django-taggit: 0.21.3 -> 0.22.1
 - irc: 15.0.4 -> 15.1.1
 - pygerduty: 0.35.1 -> 0.35.2
 - pyOpenSSL: 16.2.0 -> 17.0.0
 - python-saml: 2.2.0 -> 2.2.1
 - redbaron: 0.6.2 -> 0.6.3
 - slackclient: 1.0.2 -> 1.0.5
 - tacacs_plus: 0.1 -> 0.2
 - xmltodict: 0.10.2 -> 0.11.0
 - pip: 8.1.2 -> 9.0.1
 - setuptools: 23.0.0 -> 35.0.2
 - (requirements_ansible.in only)kombu: 3.0.35 -> 3.0.37
2017-05-08 12:03:02 -04:00