mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Initial commit
This commit is contained in:
commit
aebc1b03fd
4861 changed files with 812621 additions and 0 deletions
4
tests/integration/targets/mqtt/tasks/main.yml
Normal file
4
tests/integration/targets/mqtt/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- include: ubuntu.yml
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_release != 'trusty'
|
142
tests/integration/targets/mqtt/tasks/ubuntu.yml
Normal file
142
tests/integration/targets/mqtt/tasks/ubuntu.yml
Normal file
|
@ -0,0 +1,142 @@
|
|||
- name: Install pip packages
|
||||
pip:
|
||||
name: paho-mqtt>=1.4.0
|
||||
state: present
|
||||
|
||||
- name: MQTT non-TLS endpoint
|
||||
mqtt:
|
||||
topic: /node/s/bar/blurb
|
||||
payload: foo
|
||||
qos: 1
|
||||
client_id: me001
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is success
|
||||
|
||||
- name: Send a test message to TLS1.1 endpoint, no client version specified
|
||||
mqtt:
|
||||
topic: /node/s/bar/blurb
|
||||
payload: foo-tls
|
||||
qos: 1
|
||||
client_id: me001
|
||||
ca_certs: /tls/ca_certificate.pem
|
||||
certfile: /tls/client_certificate.pem
|
||||
keyfile: /tls/client_key.pem
|
||||
port: 8883
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is success
|
||||
|
||||
- name: Send a test message to TLS1.2 endpoint, no client version specified
|
||||
mqtt:
|
||||
topic: /node/s/bar/blurb
|
||||
payload: foo-tls
|
||||
qos: 1
|
||||
client_id: me001
|
||||
ca_certs: /tls/ca_certificate.pem
|
||||
certfile: /tls/client_certificate.pem
|
||||
keyfile: /tls/client_key.pem
|
||||
port: 8884
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is success
|
||||
|
||||
# TODO(Uncomment when TLS1.3 is supported in moquitto and ubuntu version)
|
||||
#
|
||||
# - name: Send a test message to TLS1.3 endpoint
|
||||
# mqtt:
|
||||
# topic: /node/s/bar/blurb
|
||||
# payload: foo-tls
|
||||
# qos: 1
|
||||
# client_id: me001
|
||||
# ca_certs: /tls/ca_certificate.pem
|
||||
# certfile: /tls/client_certificate.pem
|
||||
# keyfile: /tls/client_key.pem
|
||||
# port: 8885
|
||||
# register: result
|
||||
|
||||
#- assert:
|
||||
# that:
|
||||
# - result is success
|
||||
|
||||
- name: Send a message, client TLS1.1, server (required) TLS1.2 - Expected failure
|
||||
mqtt:
|
||||
topic: /node/s/bar/blurb
|
||||
payload: foo-tls
|
||||
qos: 1
|
||||
client_id: me001
|
||||
ca_certs: /tls/ca_certificate.pem
|
||||
certfile: /tls/client_certificate.pem
|
||||
keyfile: /tls/client_key.pem
|
||||
tls_version: tlsv1.1
|
||||
port: 8884
|
||||
register: result
|
||||
failed_when: result is success
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is success
|
||||
|
||||
# TODO(Uncomment when TLS1.3 is supported in moquitto and ubuntu version)
|
||||
#
|
||||
# - name: Send a message, client TLS1.1, server (required) TLS1.3 - Expected failure
|
||||
# mqtt:
|
||||
# topic: /node/s/bar/blurb
|
||||
# payload: foo-tls
|
||||
# qos: 1
|
||||
# client_id: me001
|
||||
# ca_certs: /tls/ca_certificate.pem
|
||||
# certfile: /tls/client_certificate.pem
|
||||
# keyfile: /tls/client_key.pem
|
||||
# tls_version: tlsv1.1
|
||||
# port: 8885
|
||||
# register: result
|
||||
# failed_when: result is success
|
||||
|
||||
# - assert:
|
||||
# that:
|
||||
# - result is success
|
||||
|
||||
- name: Send a message, client TLS1.2, server (required) TLS1.1 - Expected failure
|
||||
mqtt:
|
||||
topic: /node/s/bar/blurb
|
||||
payload: foo-tls
|
||||
qos: 1
|
||||
client_id: me001
|
||||
ca_certs: /tls/ca_certificate.pem
|
||||
certfile: /tls/client_certificate.pem
|
||||
keyfile: /tls/client_key.pem
|
||||
tls_version: tlsv1.2
|
||||
port: 8883
|
||||
register: result
|
||||
failed_when: result is success
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is success
|
||||
|
||||
# TODO(Uncomment when TLS1.3 is supported in moquitto and ubuntu version)
|
||||
#
|
||||
# - name: Send a message, client TLS1.2, server (required) TLS1.3 - Expected failure
|
||||
# mqtt:
|
||||
# topic: /node/s/bar/blurb
|
||||
# payload: foo-tls
|
||||
# qos: 1
|
||||
# client_id: me001
|
||||
# ca_certs: /tls/ca_certificate.pem
|
||||
# certfile: /tls/client_certificate.pem
|
||||
# keyfile: /tls/client_key.pem
|
||||
# tls_version: tlsv1.2
|
||||
# port: 8885
|
||||
# register: result
|
||||
# failed_when: result is success
|
||||
|
||||
# - assert:
|
||||
# that:
|
||||
# - result is success
|
Loading…
Add table
Add a link
Reference in a new issue