Commit Graph

62 Commits

Author SHA1 Message Date
Ryan Petrello
18f6f68540 Merge remote-tracking branch 'tower/release_3.3.0' into devel 2018-08-10 11:54:34 -04:00
John Westcott IV
0ba8022eac #2073 - Support setting to prevent Tower from pulling from requirements.yml files for an SCM project 2018-07-23 09:37:49 -04:00
Ryan Petrello
84eacfc360 fix a few isolated dev issues
the main goal of this change is to make `make docker-isolated` work out
of the box

- specify the proper version for awx-expect --version
- update some deprecated playbook bits
- change the isolated container to privileged so bwrap will work
- fix awx-manage test_isolated_connection
- expedite the first isolated heartbeat so you don't have to wait 10m;
  this is accomplished by _not_ setting Instance.last_isolated_check to
  now() at insertion time (which causes the next check not to happen for
  10 minutes)
- fix a bug that caused isolated node execution to fail when bwrap was
  enabled

see: https://github.com/ansible/tower/issues/2150

This reverts commit 9863fe71dc.
2018-06-13 14:17:58 -04:00
Bill Nottingham
efd0085ba2 Fix checkout of role requirements.
'omit' is only special as a module argument, it cannot be used in this way.
Hence, just have two conditional tasks.
2018-05-15 01:22:13 -04:00
Bill Nottingham
c3d720cbd4 Fix checkout of role requirements.
'omit' is only special as a module argument, it cannot be used in this way.
Hence, just have two conditional tasks.
2018-05-15 01:20:51 -04:00
Bill Nottingham
b3ca7acb41 Only pass --force if we have an scm_result (i.e., we ran an actual checkout/revision change.) 2018-04-25 13:46:46 -04:00
AlanCoding
affaf23a6b fix deprecation warning for project update 2018-04-16 13:22:58 -04:00
Ryan Petrello
7d9e4d6e2f support fact caching for isolated hosts
see: https://github.com/ansible/awx/issues/198
2018-02-20 15:00: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
Bill Nottingham
a2b18a9f6e Add test to short-circuit checkout if revision is already checked out.
Move role checkout to a separate play, to work with this.
2017-11-08 18:29:59 -05:00
Bill Nottingham
c827e73dac Update comments and task names. 2017-11-02 14:11:48 -04:00
AlanCoding
48ec69c4f5 retry cleanup of build artifacts for bwrap race condition 2017-10-26 13:33:21 -04:00
Bill Nottingham
871dc81da3 Avoid task duplication by using default(omit). 2017-10-25 21:30:46 -04:00
Bill Nottingham
1285e8ffef Add blocks around the different SCMs, for clarity purposes. 2017-10-25 16:58:41 -04:00
AlanCoding
f03b40aa50 enforce max line length of 160 characters 2017-10-11 12:38:39 -04:00
Chris Meyers
3dea02ceac use insights v3 api 2017-07-31 11:04:15 -04:00
adamscmRH
3dcd6ef2c2 Blocks creation of Hosts, Groups, and IS for Smart Inventories
* Updated View unit tests

* Refactored Validators

* Validator Fix for Blocking
2017-07-28 16:24:09 -04:00
Ryan Petrello
e29492a259 more tower -> awx for task execution and isolated tooling 2017-07-25 10:36:06 -04:00
Ryan Petrello
8ce1421c6a fix tower-expect -> awx-expect for isolated tower builds 2017-07-24 16:03:58 -04:00
Ryan Petrello
d42ea31f75 use a named pipe for isolated secret passthrough (not stdin)
it's not unusual for the secret data we pass into the `run_isolated.yml`
playbook to be quite long, namely because it can contain RSA key
data; by passing this value into the ansible-playbook process using
`vars_prompt`, we're limited by pexpect's tty line limit (which looks
like it caps out around 4k).  Because of this, large payloads are
being truncated and causing job run failures.

this changes the implementation to use a named pipe instead, which
doesn't have the same limitation

see: #7183
2017-07-20 12:42:03 -04:00
Chris Meyers
6652a960b7 make insights playbook fetching an Ansible module
* Gone are the days of playbook abuse.
* Our project update can now call a single Insight Ansible module to
loop over the set of maintenance plans to download and save playbooks
for use by job templates.
2017-07-11 16:28:01 -04:00
Ryan Petrello
0a5b9c458b standardize tasks.py temporary file paths under a single parameter
see: #3472
2017-07-05 13:50:43 -04:00
AlanCoding
70b1b9c81d isolated connection timeout and log file for playbook out 2017-07-05 08:48:01 -04:00
Ryan Petrello
405c01a847 more isolated production tinkering
see: #5903
see: #6507
2017-06-29 09:35:26 -04:00
Alan Rominger
2c92f623d8 Merge pull request #6617 from ansible/isolated_setup
setup playbook and heartbeat for isolated deployments
2017-06-20 17:20:53 -04:00
AlanCoding
40287d8e78 multi-host isolated heartbeat w tower-isolated check
* use tower-expect command to determine job status when running
  the isolated heartbeat playbook
* grok JSON output of playbook to obtain result information
* run playbook against multiple isolated hosts at the same time
  (addresses scalability concerns)
2017-06-20 14:36:18 -04:00
Ryan Petrello
c35d83df13 fix a race condition in isolated stdout processing 2017-06-19 16:59:03 -04:00
AlanCoding
1d9f2be0e4 add task in isolated heartbeat to delete rogue files 2017-06-19 12:13:36 -04:00
AlanCoding
dd1a261bc3 setup playbook and heartbeat for isolated deployments
* Allow isolated_group_ use in setup playbook
* Tweaks to host/queue registration commands complementing setup
* Create isolated heartbeat task and check capacity
* Add content about isolated instances to acceptance docs
2017-06-19 12:13:36 -04:00
Ryan Petrello
1ea03aa4c9 more isolated task execution tweaking
* set a more reasonable default `AWX_ISOLATED_CHECK_INTERVAL`
* make manual cancellation work for high values of
  `AWX_ISOLATED_CHECK_INTERVAL`
* remove the `/tmp/ansible_tower/jobs/` symlink directory

see: #6616
2017-06-16 15:37:07 -04:00
Ryan Petrello
44e0c8621a isolated ramparts: replace systemd unit with a tower-expect binary
instead of launching isolated tasks via `systemctl`, treat
`awx.main.isolated.run` as an executable that knows how to daemonize

additionally, add `setup.py isolated_build` for isolated Tower source
distribution
2017-06-16 09:59:21 -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
0c034f29af use insights etag as a cache
* During insights project updates, if the etag from insights matches the
last etag (scm_revision) then don't get all the maintenance playbooks.
Otherwise, get all the maintenance playbooks and update scm_revision
with the etag.
2017-05-30 18:30:13 -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
Matthew Jones
189ea4d7f8 Fix insights related spelling mistake that could cause failure 2017-04-06 10:57:19 -04:00
Matthew Jones
1902bab8be Fix a with_items insights scm reference for newer ansible behavior
Newer ansible versions don't allow with_items to reference undefined
variables so we'll provide a default.

We'll also update some conditionals to deal with naming requirements
changes on insights api endpoints
2017-04-06 10:53:18 -04:00
Matthew Jones
eeed969a56 Make sure the insight playbook fetch doesn't quote user and pass 2017-03-29 16:42:15 -04:00
Matthew Jones
536a3b1647 Don't use jinja quote filter on insights username or password
This fixes an issue where a user was trying to use an exclamation mark
in the password. Historically we've used the quote filter but more and
more we're seeing conflicts with special characters
2017-03-27 15:40:43 -04:00
Matthew Jones
03593b957b Parse the mercurial revision correctly in setup playbook
Originally the value was coming out as:

xxxxxx default tip

When we want

xxxxxx

In order for the subsequent revision request to work correctly
2017-03-17 10:45:55 -04:00
Chris Meyers
c255c07ea5 pass ansible the "raw" git repo url
* I explored the |urlencode() filter instead. Ansible and git didn't
like this.
* Quoting doesn't seemed to be required. Ansible and the git module are
smart enough to do the right thing. I tested with a space in the repo
url path and it works.
2017-03-13 09:34:52 -04:00
Matthew Jones
95a2ed6336 Updates to insights playbook project syncing based on feedback
* Support "name" if given, else use a more reasonable file name for
  the playbook file
* Fix an issue where we wouldn't populate the playbooks correctly in
  the database
* Force downloading the playbooks every time since we can't tell when
  the file might change
2017-03-07 16:48:48 -05:00
Matthew Jones
2656e3f3fa Insights project api side integration
* Extend scm credential type to support username and password for
  redhat portal accounts
* Update project update playbook to work with remote insights server
2017-03-07 16:48:44 -05:00
Ryan Petrello
9e09fd38a7 Properly parse subversion revision info.
The ansible subversion module returns revision info in an unanticipated format:

https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/source_control/subversion.py#L194-L199

Parse out the revision number we actually care about.

Resolves #4654
2017-01-17 10:04:30 -05:00
Matthew Jones
7c7d2e37ed Fix some issues syncing playbooks
* Build a list of playbooks and store it in the database at sync time
* Fix an issue running playbook sync on jobs for scan jobs
* Remove a TODO that was unneeded
2016-10-24 11:32:21 -04:00
Matthew Jones
e6bcc039f2 Rearchitect project update strategy
* Instead of using a fanout for project updates initial project
  updates will sync the latest commit hash
* Prior to a node running a job it will ensure that the latest project
  is synced
2016-10-20 13:30:44 -04:00
Graham Mainwaring
180209236e Change names of Windows scan modules to avoid ambiguity 2016-10-05 16:43:19 -04:00
Matthew Jones
a1fbee4fa0 Refactor scan_packages for os detection
* Use setup facts ansible_os_family for os family detection now.  Add
  support for Suse and it's ilk (which has a pretty ugly OS family
  implementation
2015-11-24 14:19:09 -05:00
Matthew Jones
d76ee309c6 Allo the file fact scanner to take a list of paths instead of just one path 2015-06-03 11:36:50 -04:00
Matthew Jones
2e040e9de3 Update scan facts to include the service scanner which was inexplicably
missing, update scan_packages to match the footprint of
scan_services (makes searching easier)
2015-05-05 14:46:28 -04:00
Matthew Jones
39d0f91fdb Merge pull request #117 from matburt/scan_files_implementation
Scan files implementation
2015-04-03 15:37:34 -04:00