153 Commits

Author SHA1 Message Date
Julen Landa Alustiza
8c9c02c975
awxkit: allow to modify api base url (#14835)
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com>
2024-02-07 12:26:42 +01:00
TVo
bb1922cdbb
Update conf.py to 2024 (#14743)
* Update conf.py to 2023

* Update awxkit/awxkit/cli/docs/source/conf.py

Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>

---------

Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
2024-01-04 12:38:21 -07:00
Avi Layani
df24cb692b
Adding hosts bulk deletion feature (#14462)
* Adding hosts bulk deletion feature

Signed-off-by: Avi Layani <alayani@redhat.com>

* fix the type of the argument

Signed-off-by: Avi Layani <alayani@redhat.com>

* fixing activity_entry tracking

Signed-off-by: Avi Layani <alayani@redhat.com>

* Revert "fixing activity_entry tracking"

This reverts commit c8eab52c2ccc5abe215d56d1704ba1157e5fbbd0.
Since the bulk_delete is not related to an inventory, only hosts which
can be from different inventories.

* get only needed vars to reduce memory consumption

Signed-off-by: Avi Layani <alayani@redhat.com>

* filtering the data to reduce memory increase the number of queries

Signed-off-by: Avi Layani <alayani@redhat.com>

* update the activity stream for inventories

Signed-off-by: Avi Layani <alayani@redhat.com>

* fix the changes dict initialiazation

Signed-off-by: Avi Layani <alayani@redhat.com>

---------

Signed-off-by: Avi Layani <alayani@redhat.com>
2023-12-13 10:28:31 -06:00
Gabriel Muniz
721a2002dc
Add --interval to launch monitor command (#14068)
Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
2023-06-22 11:07:26 -03:00
Shane McDonald
f1196fc019 Clean up string formatting issues from black migration 2023-05-10 08:19:23 -04:00
Lorenzo Tanganelli
479d0c2b12
add instance_groups on cli and awx.awx.role (#13784) 2023-04-04 10:09:48 -04:00
Seth Foster
34834252ff awxkit cli support
fixes for awx cli
2023-03-08 12:58:12 -05:00
Alan Rominger
93d84fe2c9
Merge pull request #13502 from AlanCoding/new_black
Update to comply with new black rules
2023-02-01 16:18:50 -05:00
Alan Rominger
f5785976be
Update to comply with new black rules 2023-02-01 14:59:38 -05:00
Ryan Mahaffey
c9d931ceee add '--order-by' option as supplied by the awx api 2023-01-27 18:21:34 -08:00
Seth Foster
e5057691ee
Merge pull request #13252 from max-len/patch-1
Update install.rst
2022-12-02 22:46:26 -05:00
Jeff Bradberry
7fa9dcbc2a
Merge pull request #13168 from ArtsiomMusin/feature_13055_add_multiple_assert_export
Add multiple asset export for awx cli
2022-11-30 15:01:42 -05:00
Max Lendrich
eaccf32aa3
Update install.rst
Fix doc for current pip==22.3
2022-11-30 16:54:42 +01:00
TVo
332c433b6e
Update conf.py
Updated variables to reflect automation controller name.
2022-11-10 14:18:25 -07:00
Artsiom Musin
c39172f516 Resolve review comments 2022-11-09 15:54:16 +01:00
Jeff Bradberry
3d3e4ad150 Avoid adding the 'config' subparser twice
Once since it is defined as a CustomCommand subclass, and once because
it is an endpoint at the /api/v2/ level.  With Python 3.11 argparse
has become more strict and will raise an exception when you try to
inject duplicate subparsers.
2022-11-08 15:13:35 -05:00
John Westcott IV
86e7151508
Get more specific as to which timeout caused the issue 2022-09-22 16:08:21 -04:00
John Westcott IV
75597cf29c
Altering --timeout from awxkit to --action-timeout to remove conflict with new launch timeout 2022-09-22 16:08:21 -04:00
Sarabraj Singh
05df2ebad2
bubble up an error code when something goes wrong with import/export
(cherry picked from commit babd6f0975fc81c4524a0d6a35a334a75aa623bb)
2022-06-22 10:29:01 -04:00
Sarabraj Singh
5bd4aade0e
Merge pull request #12404 from ansible/revert-12335-feature/awx-cli-import-export-error-codes
Revert "import/export error codes when something bad happens"
2022-06-21 22:01:46 -04:00
Jessica Steurer
470910b612
Merge pull request #12309 from jbradberry/cli-multiple-extra-vars
Allow for multiple --extra_vars or --variables flags in awx-cli
2022-06-21 19:34:25 -03:00
Sarabraj Singh
dbb81551c8
Revert "import/export error codes when something bad happens" 2022-06-21 17:36:21 -04:00
Sarabraj Singh
babd6f0975
bubble up an error code when something goes wrong with import/export 2022-06-21 15:53:59 -04:00
Jeff Bradberry
127016d36b Allow for multiple --extra_vars or --variables flags in awx-cli
This is particularly useful when you are using the @filepath version
of the flag, since otherwise there would be no way to issue the
command with multiple vars files.

Also, add `-e` as an alias to `--extra_vars`
2022-06-01 13:24:24 -04:00
Seth Foster
65dfc424bc
Improve help text for import and export 2022-05-10 13:18:40 -04:00
Jeff Bradberry
8c33d0ecbd Add the mesh_visualizer resource to awxkit 2022-01-13 15:01:54 -05:00
sezanzeb
cbe612baa5 add credential file support
Signed-off-by: sezanzeb <proxima@sezanzeb.de>
2021-09-12 17:58:49 +02:00
Elijah DeLee
11e416995a
accept old env vars
this broke our build of the cli docs
2021-06-22 10:49:39 -04:00
Amol Gautam
b64c2d6861
Removed references to tower in InventorySource and Credentials
--- Removed reference to tower in  InventorySource and InventoryUpdate model
--- Added a migration for above change
--- Added new CONTROLLER* variables in awx/main/models/credentials/__init__.py
--- Migrated awxkit to new CONTROLLER* variables
--- Updated the tests to use new CONTROLLER* variables
--- Fix some issues with upgrade path, rename more cases
2021-06-22 10:49:35 -04:00
Bill Nottingham
1e68519c99
Remove insights_credential from inventory 2021-06-22 10:49:33 -04:00
Elijah DeLee
b74990c480 allow singular execution_environment for cli
this makes "execution_environments" or "execution_environment" work
which is helpful
2021-05-25 11:28:47 -04:00
Bill Nottingham
c8cf28f266 Assorted renaming and string changes 2021-04-30 14:32:05 -04:00
Alan Rominger
38352063e8
Remove custom inventory script API 2021-04-22 08:36:46 -04:00
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Ryan Petrello
c373d5307f
allow the CLI to associate Galaxy credentials to Organizations
$ awx organizations associate Default --galaxy_credential "Ansible Galaxy"
2020-10-21 09:39:33 -04:00
Ryan Petrello
0cdcbdfea6
fix a confusing error message when extra vars aren't valid JSON/YAML
see: https://github.com/ansible/awx/issues/8359
2020-10-12 12:56:13 -04:00
Aggelos Kolaitis
9918b2581c
Support !import and !include in awx import -f yaml command 2020-09-13 17:01:12 +03:00
Ryan Petrello
815d691622
clean up old authtoken support
just use Bearer tokens - those are the only type of tokens we support
2020-08-19 12:23:00 -04:00
Ryan Petrello
987c7d48a0
minor cleanup up CLI import -f yaml support 2020-08-11 09:44:13 -04:00
Rigel Di Scala
579604d2c6 Allow YAML as a CLI import format
This changset allows the import of YAML formatted resources. The CLI
user can indicate which format to use with the `-f, --format` option.
The CLI help text has been amended to reflect the new feature.

The AWX CLI `export` subcommand offers the option of formatting the output
as YAML or JSON, so it makes sense that the `import` subcommand reflects
this.

A simple test is also provided. In order to ease the task of testing
commands that import resources by reading the stdin, the CLI has been
extended to allow specifying an alternative file descriptor for stdin,
similarly to stdout and stderr.
2020-08-10 23:43:53 +02:00
Rigel Di Scala
490746fe8c
Fix garbage being printed when exporting as YAML - related #7795
This resolves issue #7795, by passing the `encoding` keyword argument
only when the code is run on a Python 2 interpreter.

related #7795.
2020-08-03 11:57:45 -04:00
Graham Mainwaring
29da0abfc1 Don't traceback on KeyboardInterrupt 2020-06-23 16:14:02 -04:00
Jeff Bradberry
393369adec First cut at examples of the import and export commands 2020-06-18 15:32:49 -04:00
Jeff Bradberry
3860c7597f Move the import logic into methods on the ApiV2 class 2020-06-09 13:54:05 -04:00
Jeff Bradberry
e4146e9bc7 Move the export logic onto methods on the ApiV2 class
making it easier to invoke programmatically.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
19c92a7055 Enable notification templates 2020-06-09 13:54:05 -04:00
Jeff Bradberry
6a9add4fe3 Deal somewhat reasonably with missing fields as part of the natural key
- JobTemplate.organization has recently been added, we need to support
  with and without
- WorkflowJobTemplateNode is shortly going to get an identifier field,
  and we will need to support both with and without
2020-06-09 13:54:05 -04:00
Jeff Bradberry
ad574eb896 Enable credential export 2020-06-09 13:54:05 -04:00
Jeff Bradberry
55f79a4569 Fix a couple of flaws
- The dependency ordering may spit out page types that weren't in the import data set.  Make sure to be able to map those to resources anyway.
- freeze() needs to be able to deal with nullable foreign keys.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
d20fa03034 Create new Import.dependent_resources method
that yields up resource names, even ones that aren't explicitly in the
import data, in dependency order.
2020-06-09 13:54:05 -04:00