mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
Remove Collections module parameters deprecated in Controller 4.0.0
This commit is contained in:
@@ -8,59 +8,15 @@
|
||||
pd_not: "AWX-Collection-tests-notification_template-pd-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
irc_not: "AWX-Collection-tests-notification_template-irc-not-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
|
||||
- name: Test deprecation warnings with legacy name
|
||||
notification_template:
|
||||
name: "{{ slack_not }}"
|
||||
organization: Default
|
||||
notification_type: slack
|
||||
username: maw
|
||||
sender: maw
|
||||
recipients:
|
||||
- everyone
|
||||
use_tls: true
|
||||
host: all
|
||||
use_ssl: false
|
||||
password: password
|
||||
port: 12
|
||||
channels:
|
||||
- general
|
||||
token: chunkecheese
|
||||
account_token: asdf1234
|
||||
from_number: "1 (888) 733-4281"
|
||||
to_numbers:
|
||||
- 867-5309
|
||||
account_sid: vicious
|
||||
subdomain: 'redhat.com'
|
||||
service_key: skeleton
|
||||
client_name: Bill
|
||||
message_from: me
|
||||
color: green
|
||||
notify: true
|
||||
url: ansible.com
|
||||
headers:
|
||||
X-Custom-Header: value123
|
||||
server: littimer.somewhere.com
|
||||
nickname: chalk
|
||||
targets:
|
||||
- zombie
|
||||
state: absent
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'deprecations' in result"
|
||||
# The 25 can be count from the size of the OLD_INPUT_NAMES list in the module
|
||||
- result['deprecations'] | length() == 25
|
||||
|
||||
- name: Create Slack notification with custom messages
|
||||
notification_template:
|
||||
name: "{{ slack_not }}"
|
||||
organization: Default
|
||||
notification_type: slack
|
||||
token: a_token
|
||||
channels:
|
||||
- general
|
||||
notification_configuration:
|
||||
token: a_token
|
||||
channels:
|
||||
- general
|
||||
messages:
|
||||
started:
|
||||
message: "{{ '{{' }} job_friendly_name {{' }}' }} {{ '{{' }} job.id {{' }}' }} started"
|
||||
@@ -91,9 +47,10 @@
|
||||
name: "{{ webhook_not }}"
|
||||
organization: Default
|
||||
notification_type: webhook
|
||||
url: http://www.example.com/hook
|
||||
headers:
|
||||
X-Custom-Header: value123
|
||||
notification_configuration:
|
||||
url: http://www.example.com/hook
|
||||
headers:
|
||||
X-Custom-Header: value123
|
||||
state: present
|
||||
register: result
|
||||
|
||||
@@ -117,15 +74,16 @@
|
||||
name: "{{ email_not }}"
|
||||
organization: Default
|
||||
notification_type: email
|
||||
username: user
|
||||
password: s3cr3t
|
||||
sender: tower@example.com
|
||||
recipients:
|
||||
- user1@example.com
|
||||
host: smtp.example.com
|
||||
port: 25
|
||||
use_tls: false
|
||||
use_ssl: false
|
||||
notification_configuration:
|
||||
username: user
|
||||
password: s3cr3t
|
||||
sender: tower@example.com
|
||||
recipients:
|
||||
- user1@example.com
|
||||
host: smtp.example.com
|
||||
port: 25
|
||||
use_tls: false
|
||||
use_ssl: false
|
||||
state: present
|
||||
register: result
|
||||
|
||||
@@ -171,11 +129,12 @@
|
||||
name: "{{ twillo_not }}"
|
||||
organization: Default
|
||||
notification_type: twilio
|
||||
account_token: a_token
|
||||
account_sid: a_sid
|
||||
from_number: '+15551112222'
|
||||
to_numbers:
|
||||
- '+15553334444'
|
||||
notification_configuration:
|
||||
account_token: a_token
|
||||
account_sid: a_sid
|
||||
from_number: '+15551112222'
|
||||
to_numbers:
|
||||
- '+15553334444'
|
||||
state: present
|
||||
register: result
|
||||
|
||||
@@ -199,10 +158,11 @@
|
||||
name: "{{ pd_not }}"
|
||||
organization: Default
|
||||
notification_type: pagerduty
|
||||
token: a_token
|
||||
subdomain: sub
|
||||
client_name: client
|
||||
service_key: a_key
|
||||
notification_configuration:
|
||||
token: a_token
|
||||
subdomain: sub
|
||||
client_name: client
|
||||
service_key: a_key
|
||||
state: present
|
||||
register: result
|
||||
|
||||
@@ -226,13 +186,14 @@
|
||||
name: "{{ irc_not }}"
|
||||
organization: Default
|
||||
notification_type: irc
|
||||
nickname: tower
|
||||
password: s3cr3t
|
||||
targets:
|
||||
- user1
|
||||
port: 8080
|
||||
server: irc.example.com
|
||||
use_ssl: false
|
||||
notification_configuration:
|
||||
nickname: tower
|
||||
password: s3cr3t
|
||||
targets:
|
||||
- user1
|
||||
port: 8080
|
||||
server: irc.example.com
|
||||
use_ssl: false
|
||||
state: present
|
||||
register: result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user