Commit Graph

52 Commits

Author SHA1 Message Date
zicklam
42f30e72b5 False is not false 2019-05-08 08:35:26 +02:00
zicklam
0fb3851a2b webhook_notification set default for var 'disable_ssl_verification' 2019-05-08 08:21:04 +02:00
zicklam
08d60d0b78 Update test_notification Template for webhooks
- rename webhook_no_verify_ssl to disable_ssl_verification
2019-05-06 19:20:00 +02:00
zicklam
5b8fba58e8 Add "Disable SSL Verification" checkbox to webhook notification
This commit will add a checkbox which will disable SSL verification on
the generic webhook notification type. This is required when using
self-signed certificates.
2019-05-06 13:12:41 +02:00
beeankha
3e13eff7f4 Change serializer to take in init paramdefault value 2019-03-21 15:22:34 -04:00
beeankha
c9ac805eed [WIP] Provide Default Email Timeout Value 2019-03-20 16:17:48 -04:00
beeankha
66a52655df Change email notification success/fail messages and add a timeout feature 2019-03-14 16:37:22 -04:00
Sebastian
4058d18593 Add grafana notification type 2019-01-20 13:51:23 +01:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
Shane McDonald
580004b395 Merge remote-tracking branch 'downstream/release_3.3.0' into devel
# Conflicts:
#	awx/main/notifications/slack_backend.py
2018-09-18 08:11:50 -04:00
Ryan Petrello
4bc63cc37e fix a bug that broke bot avatars for Slack notifications
when a *color* is specified for a Slack notification template, we use
the *web* not the RTM API; when you use a bot with the web API, you have
to specify the `as_user=True` argument to have the message use the bot's
name and avatar

see: https://github.com/ansible/tower/issues/2883
see: https://github.com/ansible/awx/issues/2187
2018-08-22 10:57:13 -04:00
walkafwalka
0b9726a3ed Standardize Slack backend API method
Signed-off-by: walkafwalka <41709139+walkafwalka@users.noreply.github.com>
2018-08-02 05:31:38 +00:00
Jeandre Le Roux
fd12c44ada Add Rocket.Chat notification type
Summary: Add Rocket.Chat notification type
Issue type: Feature Pull Request
Component: Notifications

Signed-off-by: Jeandre Le Roux <theblazehen@theblazehen.com>
2018-03-21 10:02:50 +02:00
paihu
dfea3a4b95 fix: broken backward compatibility
fix: param hex_color isn't optional

Signed-off-by: paihu <paihu_j@yahoo.co.jp>
2018-03-13 18:04:47 +09:00
paihu
9b5e088d70 support slack color notification #1490
Signed-off-by: paihu <paihu_j@yahoo.co.jp>
2018-03-12 14:14:44 +09:00
Matthew Jones
8505783350 Merge remote-tracking branch 'tower/release_3.2.3' into devel
* tower/release_3.2.3:
  fix unicode bugs with log statements
  use --export option for ansible-inventory
  add support for new "BECOME" prompt in Ansible 2.5+ for adhoc commands
  enforce strings for secret password inputs on Credentials
  fix a bug for "users should be able to change type of unused credential"
  fix xss vulnerabilities - on host recent jobs popover - on schedule name tooltip
  fix a bug when testing UDP-based logging configuration
  bump templates form credential_types page limit
  Wait for Slack RTM API websocket connection to be established
  don't process artifacts from custom `set_stat` calls asynchronously
  don't overwrite env['ANSIBLE_LIBRARY'] when fact caching is enabled
  only allow facts to cache in the proper file system location
  replace our memcached-based fact cache implementation with local files
  add support for new "BECOME" prompt in Ansible 2.5+
  fix a bug in inventory generation for isolated nodes
  properly handle unicode for isolated job buffers
2018-02-20 12:22:25 -05:00
Wayne Witzel III
aa469d730e Wait for Slack RTM API websocket connection to be established 2018-01-24 13:48:42 +00:00
Romain Brucker
cdc6096515 fixing indent 2017-09-28 11:37:07 -05:00
Romain Brucker
31e559b6a1 Checking if color is not None before setting it to lowercase 2017-09-28 11:33:45 -05:00
Romain Brucker
1bb72cc680 Adding a check to see if the color is 'None' before lowercasing it for @matburt 2017-09-28 11:15:14 -05:00
Romain Brucker
e67549e4a1 Changing the color option for hipchat to always be lowercase (expected by the API)
Signed-off-by: Romain Brucker <romain.brucker@amalto.com>
2017-09-26 11:32:05 -05:00
Nicholas O. Wilburn
68d240b77b Add "Disable SSL Verification" button to mattermost notification
This commit will add a button which will disable SSL notifications
for the mattermost webhook. This is required when using self-signed
certificates.
2017-09-14 18:25:04 -07:00
Nicholas O. Wilburn
69122a5454 Remove trailing whitespace 2017-09-14 18:24:54 -07:00
Nicholas O. Wilburn
f347caf825 Remove debugging line 2017-09-14 18:24:29 -07:00
crepe
bb0e968704 Add mattermost notifications 2017-09-09 22:00:31 -07:00
Matthew Jones
e64d13486f Remove Tower reference from email backend 2017-07-31 12:00:39 -04:00
Matthew Jones
9fe6453b1c Refactor Notification backend for tower -> awx 2017-07-26 13:33:30 -04:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -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
Matthew Jones
8553b8eda6 Ignore hipchat certificate verification 2017-02-14 14:21:51 -05:00
sundeep-co-in
d7b3b90f4d update strings 2016-10-25 16:12:41 +05:30
Wayne Witzel III
a0c563e831 flake8 fixups 2016-07-26 14:50:48 -04:00
Matthew Jones
60e012f75b Force requests to emit application/json
When sending webhook notifications
2016-07-25 12:46:12 -04:00
Matthew Jones
2a4fa0ed9d Increment sent messages for pagerduty backend 2016-06-22 12:09:04 -04:00
Matthew Jones
c812e85f65 Change email notification formatting.
Instead of pretty printing the datastructure we'll now dump out the
result in json format with indent=4 for pretty viewing.
2016-06-22 11:52:49 -04:00
Matthew Jones
9ba98d9cac Rename channels to rooms for hipchat notifications 2016-05-17 15:33:22 -04:00
Matthew Jones
76728fcba7 Set a user agent for the webhook if not provided 2016-05-12 10:54:00 -04:00
Matthew Jones
256487a963 Strip hash marks from slack channels at send time 2016-04-25 09:49:36 -04:00
Matthew Jones
f286dc7486 Fix an issue with the email notifier
Incorrect body format assumptions in the email notifier
2016-03-21 15:40:41 -04:00
Matthew Jones
0ee12901fe Fix some notifications issues and write some tests
* Fixes some notifier merging issues
* Fixes some more unicode problems
* Implements unit tests
2016-02-29 12:30:00 -05:00
Matthew Jones
41d5393af0 Clean up flake8 related issues 2016-02-23 15:30:07 -05:00
Matthew Jones
4b1493f456 Fixing up some unicode issues 2016-02-23 15:26:29 -05:00
Matthew Jones
39c942e98b Adding migration and base notification type 2016-02-23 11:20:08 -05:00
Matthew Jones
4928badd3f Add a periodic administrative notification 2016-02-23 10:59:08 -05:00
Matthew Jones
ab3669efa9 Refactor message generator
* Job object can now control the output and generate K:V output for
  notification types that can support it
* Notifications store the body as json/dict now to encode more
  information
* Notification Type can further compose the message based on what is
  sensible for the notification type
* This will also allow customizing the message template in the future
* All notification types use sane defaults for the level of detail now
2016-02-22 17:09:36 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Matthew Jones
9d6739045a Implement irc notification backend 2016-02-11 15:34:27 -05:00
Matthew Jones
7abcb6e306 Add webhook notification backend 2016-02-10 17:03:57 -05:00
Matthew Jones
34ebe0a848 Pagerduty and Hipchat backends plus some cleanup 2016-02-10 15:17:11 -05:00
Matthew Jones
8db2f60405 Notification serializers, views, and tasks
* Implement concrete Notification model for notification runs
* Implement NotificationTemplate and Notification serializers and views
* Implement ancillary views
* Implement NotificationTemplate trigger m2m fields on all job templates
  via a fields mixin
* Link NotificationTemplates with an org
* Link notifications with the activity stream
* Implement Notification celery tasks
* Extend Backend field parameters to identify sender and receiver as
  parameters needed by the message and not the backend itself
* Updates to backends to better fit the django email backend model as it
  relates to Messages
* Implement success job chain task + notifications
* Implement notifications in error job chain task
2016-02-09 23:12:55 -05:00