Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.7 Release #70

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
701aeea
Enhanced Inventory (#3)
willtome Feb 29, 2020
15a7594
Update version for Galaxy
amittell Feb 29, 2020
5de6a46
Fix README
amittell Mar 2, 2020
26a97e4
Added support for specifying custom service now domain. (#5)
Akasurde Mar 3, 2020
1ad03af
Autopep8 + remove unused sys module
amittell Mar 3, 2020
845101f
Merge pull request #6 from ServiceNowITOM/clean_up_pep_issues
willtome Apr 7, 2020
74aafd7
Collection Migration (#8)
willtome Apr 23, 2020
eb12bb0
adding changelog
willtome May 1, 2020
ca48e4e
update version to 1.1.0
willtome May 4, 2020
49bb53f
Enhanced Inventory (#3)
willtome Feb 29, 2020
4962144
Update version for Galaxy
amittell Feb 29, 2020
b20fe17
Fix README
amittell Mar 2, 2020
5b54717
Added support for specifying custom service now domain. (#5)
Akasurde Mar 3, 2020
b2bb380
Autopep8 + remove unused sys module
amittell Mar 3, 2020
c587373
Collection Migration (#8)
willtome Apr 23, 2020
56dab4d
adding changelog
willtome May 1, 2020
849cf0b
update version to 1.1.0
willtome May 4, 2020
3b9fe17
Merge branch 'master' into devel
willtome May 4, 2020
8c64cab
Merge branch 'devel' of github.com:ServiceNowITOM/servicenow-ansible …
willtome May 4, 2020
0b3de83
fix for ansible-test
willtome May 4, 2020
750e24a
fix for ansible-test
willtome May 4, 2020
622fff1
fix version #
willtome May 4, 2020
452a47b
add CI badge
willtome May 4, 2020
01d1d9b
Add Docs (#13)
willtome May 19, 2020
ae1ed4c
Add release automation (#16)
willtome Jun 23, 2020
eabee69
Remove unrecognized keyword (#15)
willtome Jun 23, 2020
05e83f9
update namespace
willtome Jun 23, 2020
bb7bd66
Update inventory to use same auth parameters as modules (#19)
willtome Aug 22, 2020
af07c55
Add antsibull-changelog (#24)
willtome Sep 9, 2020
426ba30
merge from master
willtome Sep 9, 2020
f4d9bf2
remove old changelog
willtome Sep 9, 2020
265556a
Update docs (#30)
Akasurde Oct 13, 2020
072dc6c
Fix hostname transformation (#26)
willtome Oct 16, 2020
1fb9dea
add bug fixes
willtome Oct 16, 2020
e54c2bb
add runtime.yml
willtome Oct 16, 2020
49132f2
reduce line length
willtome Oct 16, 2020
12105aa
trailing whitespace
willtome Oct 16, 2020
13402e3
update release date
willtome Oct 30, 2020
d7557ff
Support for python dependencies in Ansible Execution Envs" (#39)
termlen0 Dec 4, 2020
7b966b7
Support API parameters and Pysnow resource API (0.6-0.7) (#37)
nesies Feb 2, 2021
dd34a73
Update CHANGELOG.rst
amittell Feb 2, 2021
11c958e
Merge branch 'main' into devel
amittell Feb 2, 2021
c83cf6c
update changelog
willtome Feb 3, 2021
fc8b46d
ISSUE 27 Support OpenID Connect protocol (#47)
n3pjk Mar 23, 2021
feb708e
1.0.5 Release
willtome Apr 2, 2021
0345be4
resolve conflicts
willtome Apr 2, 2021
7c50fbd
resolve conflicts
willtome Apr 2, 2021
0b362ae
Issue 58 - Make auth backwards compatible and fix order_by (#59)
n3pjk Apr 30, 2021
8211d31
Update changelog for v1.0.6
amittell May 25, 2021
359b150
Update for v1.0.6
amittell May 25, 2021
dc595a8
Update CHANGELOG.rst
amittell May 25, 2021
beac0d6
v1.0.6 changelog updates
amittell May 25, 2021
12bc3db
Merge branch 'main' into devel
amittell May 25, 2021
209d1e4
fix pep8/pylint issues
amittell May 25, 2021
85f9071
fix pep8/pylint issues
amittell May 25, 2021
aa2e6f8
add support for host vars from fields in related tables (#45)
May 28, 2021
b7f3dd7
Add SN_FILTER_RESULTS env settings. (#64)
HampusLundqvist Aug 31, 2021
7fa688d
add deprecation notice (#69)
willtome Sep 13, 2021
cc65b57
update changelog
willtome Sep 13, 2021
0e4361e
update changelog
willtome Sep 13, 2021
97e11f6
Merge branch 'main' into devel
willtome Sep 13, 2021
cc0d73b
fix changelog
willtome Sep 13, 2021
63bcc5f
fix changelog
willtome Sep 13, 2021
4e6be0d
update deprectaion notices
willtome Oct 25, 2021
475dc3f
update tests
willtome Oct 25, 2021
3a86416
update tests
willtome Oct 25, 2021
736d5f6
update runtime.yml
willtome Oct 25, 2021
64292da
update runtime.yml
willtome Oct 25, 2021
ed8b93c
update runtime.yml
willtome Oct 25, 2021
9abaaa5
Update now.yml
dingarim Apr 10, 2023
25e1f3c
Update now.yml
dingarim Apr 10, 2023
f95c7bd
Update module_test.yml
dingarim Apr 10, 2023
9b6b4db
Update module_test_cmdb_ci_server.yml
dingarim Apr 10, 2023
3c90ed0
Update network.enhanced.now.yml
dingarim Apr 10, 2023
90f1eba
Update now.yml.sample
dingarim Apr 10, 2023
cc9ac73
Update enhanced.now.yml
dingarim Apr 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ jobs:
# Testing against `devel` may fail as new tests are added.
- stable-2.9 # Only if your collection supports Ansible 2.9
- stable-2.10
- stable-2.11
- devel
python:
- 2.7
- 3.7
- 3.8
exclude:
- python: 3.8 # blocked by ansible/ansible#70155
runs-on: ubuntu-latest
steps:

Expand Down
18 changes: 14 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,27 @@ Servicenow.Servicenow Release Notes
.. contents:: Topics


v1.0.7
======

Release Summary
---------------

DEPRECATED - This collection is deprecated in favor of servicenow.itsm.

Minor Changes
-------------

- add environment var SN_FILTER_RESULTS to inventory plugin

v1.0.6
======

Bugfixes
--------

- Resolves Issues #58, #57, #51 and makes auth backwards compatible by defaulting to OAuth if client_id is present without specifying auth.
- Order_by is implemented client-side to provide proper sorting as previously documented.

=======
- makes auth backwards compatible by defaulting to OAuth if client_id is present without specifying auth
- order_by again working by locally sorting return list of records

v1.0.5
======
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
![CI](https://github.com/ServiceNowITOM/servicenow-ansible/workflows/CI/badge.svg)

## **[DEPRECATED]**
This collection is superseded by [servicenow.itsm](https://galaxy.ansible.com/servicenow/itsm). Please open any new issues, pull requests, and feature requests to the new [repository](https://github.com/ansible-collections/servicenow.itsm). Thank you to all that contributed and helped to make this collection a success.

---

# Ansible Collection for ServiceNow
This collection provides a series of Ansible modules, roles, and plugins for interacting with [ServiceNow](https://servicenow.com)

Expand Down
3 changes: 2 additions & 1 deletion changelogs/.plugin-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ plugins:
name: snow_record_find
namespace: ''
version_added: null
netconf: {}
shell: {}
strategy: {}
vars: {}
version: 1.0.6
version: 1.0.7
13 changes: 12 additions & 1 deletion changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,19 @@ releases:
1.0.6:
changes:
bugfixes:
- makes auth backwards compatible by defaulting to OAuth if client_id is present
without specifying auth
- order_by again working by locally sorting return list of records
- makes auth backwards compatible by defaulting to OAuth if client_id is present without specifying auth
fragments:
- 58_order_by.yml
release_date: '2021-05-26'
1.0.7:
changes:
deprecated_features: This collection is deprecated in favor of servicenow.itsm
minor_changes:
- add environment var SN_FILTER_RESULTS to inventory plugin
release_summary: DEPRECATED - This collection is deprecated in favor of servicenow.itsm.
fragments:
- 64_filter_env_vars.yml
- 69_deprecation.yml
release_date: '2021-09-13'
6 changes: 3 additions & 3 deletions config/now.yml.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugin: servicenow.servicenow.now
instance: demo.service-now.com
username: admin
password: password
instance:
username:
password:
cache: True
14 changes: 14 additions & 0 deletions docs/inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,19 @@ compose:
keyed_groups:
- key: sn_tags | lower
prefix: 'tag'
```

### Use related table field
```yaml
plugin: servicenow.servicenow.now
instance: dev89007
username: admin
password: password
table: cmdb_ci_netgear
selection_order: fqdn
fields: [name,host_name,fqdn,model_id.model_number]
filter_results: operational_status=1^fqdnISNOTEMPTY^manufacturerSTARTSWITHCisco
keyed_groups:
- key: sn_model_id_model_number | lower
prefix: 'model'
```
1 change: 1 addition & 0 deletions galaxy.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ authors:
- "Will Tome (@willtome)"
- "Alex Mittell (@alex_mittell)"
description: >
[DEPRECTATED] Please migrate to servicenow.itsm.
The Service Now modules previously packaged as part of Ansible, now
in a Collection distributed via Ansible Galaxy. snow_record creates,
updates or deletes a record in a specified table in the Service Now
Expand Down
17 changes: 16 additions & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
---
requires_ansible: '>=2.9.10'
requires_ansible: '>=2.9.10'
plugin_routing:
inventory:
now:
tombstone:
removal_version: "6.0.0"
warning_text: Please migrate to inventory provided by servicenow.itsm collection
modules:
snow_record:
deprecation:
removal_version: "6.0.0"
warning_text: Please migrate to modules provided by servicenow.itsm collection
snow_record_find:
deprecation:
removal_version: "6.0.0"
warning_text: Please migrate to modules provided by servicenow.itsm collection
3 changes: 3 additions & 0 deletions plugins/doc_fragments/service_now.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ class ModuleDocFragment(object):
- Any other credentials previously supplied, must be provided again.
required: false
type: dict
deprecated:
removed_in: "6.0.0"
why: This collection is deprecated in favor of servicenow.itsm
'''
23 changes: 21 additions & 2 deletions plugins/inventory/now.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
type: string
default: cmdb_ci_server
fields:
description: Comma seperated string providing additional table columns to add as host vars to each inventory host.
description:
- Comma seperated string providing additional table columns to add as host vars to each inventory host.
- Related table fields are valid. Usual period separator is changed to underscore.
- e.g. sn_model_id.model_name -> sn_model_id_model_name
type: list
default: 'ip_address,fqdn,host_name,sys_class_name,name'
selection_order:
Expand All @@ -77,6 +80,8 @@
description: Filter results with sysparm_query encoded query string syntax. Complete list of operators available for filters and queries.
type: string
default: ''
env:
- name: SN_FILTER_RESULTS
proxy:
description: Proxy server to use for requests to ServiceNow.
type: string
Expand Down Expand Up @@ -137,6 +142,19 @@
keyed_groups:
- key: sn_tags | lower
prefix: 'tag'

# Use related table field
plugin: servicenow.servicenow.now
instance: dev89007
username: admin
password: password
table: cmdb_ci_netgear
selection_order: fqdn
fields: [name,host_name,fqdn,model_id.model_number]
filter_results: operational_status=1^fqdnISNOTEMPTY^manufacturerSTARTSWITHCisco
keyed_groups:
- key: sn_model_id_model_number | lower
prefix: 'model'
'''

try:
Expand Down Expand Up @@ -286,7 +304,8 @@ def parse(self, inventory, loader, path,

# set variables for host
for k in record.keys():
self.inventory.set_variable(host_name, 'sn_%s' % k, record[k])
k2 = k.replace('.', '_')
self.inventory.set_variable(host_name, 'sn_%s' % k2, record[k])

# add relationship based groups
if enhanced and enhanced_groups:
Expand Down
6 changes: 3 additions & 3 deletions tests/enhanced.now.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
plugin: servicenow.servicenow.now
instance: dev93775.service-now.com
username: admin
password: knTVFcRlD6d9
instance:
username:
password:
selection_order: name
enhanced: True
#keyed_groups:
Expand Down
8 changes: 4 additions & 4 deletions tests/module_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
- hosts: localhost
gather_facts: no
vars:
sn_instance: dev89007
sn_instance:
login: &login
username: admin
password: ha53wiaYCKDX
username:
password:

tasks:
- name: test with instance
Expand Down Expand Up @@ -33,4 +33,4 @@
query:
starts_with:
- short_description: "Test"
<<: *login
<<: *login
6 changes: 3 additions & 3 deletions tests/module_test_cmdb_ci_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
- hosts: localhost
gather_facts: no
vars:
sn_instance: dev89007
sn_instance:
login: &login
username: admin
password: ha53wiaYCKDX
username:
password:

tasks:
- set_fact:
Expand Down
6 changes: 3 additions & 3 deletions tests/network.enhanced.now.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
plugin: servicenow.servicenow.now
instance: dev93775.service-now.com
username: admin
password: le4MnTLd3bCK
instance:
username:
password:
table: cmdb_ci_netgear
selection_order: name
enhanced: True
8 changes: 4 additions & 4 deletions tests/now.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
plugin: servicenow.servicenow.now
host: dev95176.service-now.com
username: admin
password: P0aX7VAtnyXm
host:
username:
password:
selection_order: name
fields:
- os
Expand All @@ -23,4 +23,4 @@ keyed_groups:
prefix: ''
separator: ''
compose:
os_class: sn_os.split(' ')[0]
os_class: sn_os.split(' ')[0]