Kevin Pavon
b8ec7c4072
Schedule rruleset fix related #13446 ( #13611 )
...
Signed-off-by: Kevin Pavon <7450065+KaraokeKev@users.noreply.github.com>
Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
2023-08-16 16:10:31 -03:00
Alan Rominger
3051384f95
Follow suggestion from comment, split if NOT list
2023-02-23 12:05:32 -05:00
Alan Rominger
811ecb8673
Follow suggestion from comment, split if NOT list
2023-02-23 12:05:21 -05:00
npithonDR
4630757f5f
Fix error for byweekday in schedule_rruleset
...
Fix error:
```
fatal: [localhost]: FAILED! => {
"msg": "An unhandled exception occurred while running the lookup plugin 'awx.awx.schedule_rruleset'. Error was a <class 'ansible.errors.AnsibleError'>, original message: In rule 1 byweekday must only contain values in monday, tuesday, wednesday, thursday, friday, saturday, sunday. In rule 1 byweekday must only contain values in monday, tuesday, wednesday, thursday, friday, saturday, sunday"
}
```
with:
```
- name: Build a complex schedule for every monday using the rruleset plugin
awx.awx.schedule:
name: "Test build complex schedule"
state: present
unified_job_template: "template name"
rrule: "{{ query('awx.awx.schedule_rruleset', '2030-04-30 10:30:45', rules=rrules, timezone='Europe/Paris' ) }}"
vars:
rrules:
- frequency: 'day'
interval: 1
byweekday: 'monday'
```
2023-02-09 09:34:10 +01:00
Alan Rominger
a2f528e6e5
Fix syntax bug that came from fixing sanity tests ( #13473 )
2023-01-31 15:55:20 -05:00
Alan Rominger
ac8cff75ce
Run collection sanity tests in CI ( #13356 )
...
* Run collection sanity tests in CI
This requires adding a Makefile install of ansible-core
Fake the version to make semver check happy
* Fixes from ansible-test sanity failures
* Exclude the export module due to awxkit requirement
* Fix broken ansible-test rule exceptions
remove Ansible 2.14 exclusions that make ansible-test ERROR, saying they are not needed
2022-12-20 16:06:25 -05:00
Jake Jackson
71a6baccdb
Fix lookup plugins sanity ( #13238 )
...
* fix pytz
* fix NameError
* fix tests and add sanity ignore files for import test until distutils replaced
* change static method to regular method and update test to instantiate class
2022-12-15 16:40:51 -05:00
Manas Maiti
7b2938f515
fix typo
2022-12-12 18:01:15 +01:00
John Westcott IV
c67f50831b
Modifying schedules API to allow for rrulesets #5733 ( #12043 )
...
* Added schedule_rruleset lookup plugin for awx.awx
* Added DB migration for rrule size
* Updated schedule docs
* The schedule API endpoint will now return an array of errors on rule validation to try and inform the user of all errors instead of just the first
2022-04-28 15:38:20 -04:00
Alan Rominger
02e18cf919
Fix more F811 linter violations
2022-01-14 13:23:05 -05:00
Bianca Henderson
f74a14e34f
Update auth_plugin doc extension to fix malformed Collections docs
2021-10-18 11:08:17 -04:00
beeankha
e88e81928c
Fix sanity errors for collections
2021-07-30 10:53:44 -04:00
Alan Rominger
08cb497689
Run flake8 on the AWX collection in CI
2021-07-09 12:01:28 -04:00
Seth Foster
f06485feca
fqcn redirects, and raise from sanity test fix
2021-06-08 14:33:29 -04:00
Seth Foster
4bd910493a
sanity tests
2021-06-08 14:33:28 -04:00
Seth Foster
cd100fd770
fix super and kwargs
2021-06-08 14:33:28 -04:00
Seth Foster
157adb828e
various sanity fixes
2021-06-08 14:33:28 -04:00
Sarabraj Singh
27a1254883
fixed ansible-test sanity import tests; removed sanity-ignore files
2021-06-08 14:33:28 -04:00
Seth Foster
54dd24b96b
auth_plugin env alternative
2021-06-08 14:33:25 -04:00
Seth Foster
39b26c8f0e
Added env variable CONTROLLER_HOST, et al. Add awx.awx namespace to the runtime.yml redirects, and added templating task to change to ansible.controller
2021-06-08 14:33:24 -04:00
Seth Foster
82c5803e59
mostly includes renaming non-syntax references to tower
2021-06-08 14:33:24 -04:00
Seth Foster
7a63785255
more rename, mostly in test
2021-06-08 14:33:23 -04:00
Seth Foster
44fed1d7c1
pycharm refactor rename files and class, linux rename tower_ controller_
2021-06-08 14:33:22 -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
John Westcott IV
ee3a90d193
Adding example of specifying connection info
2020-09-16 14:52:41 -04:00
John Westcott IV
24bdbd8c58
Fixing issue with lookup plugin not able to load host, user, etc
2020-09-16 14:41:04 -04:00
John Westcott IV
40f6741474
Adding import/export awx kit features
...
Changed library structure
Origional TowerModule becomes TowerLegacyModule
TowerModule from tower_api becomes TowerAPIModule
A real base TowerModule is created in tower_module.py
A new TowerAWXKitModule is created in tower_awxkit
TowerAWXKitModule and TowerAPIModule are child classes of TowerModule
2020-08-19 14:12:50 -04:00
beeankha
95cf6aa6d0
Make minor edits to the rrule module
2020-07-28 10:36:52 -04:00
John Westcott IV
3784f9515e
More refinement of examples
2020-07-14 09:38:26 -04:00
John Westcott IV
6638d6c2bb
Update examples
2020-07-14 09:38:26 -04:00
John Westcott IV
381e9d2901
Reverting commit 81b192c3b0520be0897f95e2630edab295e6bf24, we should fail only if we are > max_objects
2020-07-14 09:38:26 -04:00
John Westcott IV
0424370d49
Revamp of the examples
2020-07-14 09:38:26 -04:00
John Westcott IV
1a4bb42ac5
When using return_ids send back a list of strings instead of ints.
...
When we used ints and passed this data into a nother call like:
- name: Create a job template with a looked up credential from a folded lookup
tower_job_template:
name: "{{ job_template_name }}"
credentials: >-
{{ lookup(
'awx.awx.tower_api',
'credentials',
query_params={ 'name' : credential_name },
return_ids=True,
expect_one=True,
wantlist=True
) }}
project: "{{ project_name }}"
inventory: Demo Inventory
playbook: hello_world.yml
job_type: run
state: present
register: create_jt
Ansible would raise this warning:
[WARNING]: The value 30 (type int) in a string field was converted to '30' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.
Returning a list of strings prevents that.
2020-07-14 09:38:26 -04:00
John Westcott IV
fdb008fb8c
Added note about exception if list view return is > max_objects
2020-07-14 09:38:26 -04:00
John Westcott IV
d793f0bc99
Making the count check >= instead of just >
2020-07-14 09:38:26 -04:00
John Westcott IV
a9c16a6c90
Fixing undefined variabe
2020-07-14 09:38:26 -04:00
Alan Rominger
34c23caed3
make lookup plugin compatible with ansible.tower namespace ( #9 )
2020-07-14 09:38:26 -04:00
AlanCoding
8239232d4d
Delete the tower_get_id plugin and tests
2020-07-14 09:38:26 -04:00
AlanCoding
30ff112c87
Pull in functionality from lookup plugin get_id into tower_api itself
2020-07-14 09:38:26 -04:00
John Westcott IV
f4454a6c93
Make tower_api a generic GET'er
2020-07-14 09:38:26 -04:00
John Westcott IV
44a3057d16
Initial fixes from github comments
2020-07-14 09:38:26 -04:00
John Westcott IV
3c02265986
Fixing doc issue
2020-07-14 09:38:26 -04:00
beeankha
6715ea493f
Fix documentation in api lookup plugin, fix typos in integration tests
2020-07-14 09:38:26 -04:00
John Westcott IV
6d626b3793
Adding tower_api and tower_get_id lookup plugins
2020-07-14 09:38:26 -04:00
AlanCoding
86f1ba984a
Comply with updated Ansible sanity test rules
2020-06-03 08:44:11 -04:00
John Westcott IV
a2243d91d2
Now actually checking the version instead of just getting it
2020-05-21 09:15:06 -04:00
John Westcott IV
a4ec6f6763
Validating the version of python-dateutil
2020-05-20 14:41:43 -04:00
AlanCoding
d825cca9f2
Unit testing of tower_schedule
...
Move previously integration tests of lookup plugin to unit tests
delete all integration tests except some basic demo tests
do simple create unit test
2020-05-07 14:42:47 -04:00
John Westcott IV
694c7e8af5
Remocing doc fragment extension
2020-05-07 14:42:47 -04:00
John Westcott IV
2ed3a39b46
Changing import
2020-05-07 14:42:47 -04:00