1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

supervisorctl tests: shorten path to .sock file to make OSX happy. (#77)

This commit is contained in:
Felix Fontein 2020-03-31 10:52:24 +02:00 committed by GitHub
parent e92f288d5b
commit 74d83d8e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View file

@ -2,4 +2,3 @@ destructive
shippable/posix/group2
skip/python3
skip/aix
disabled #fixme

View file

@ -1,4 +1,9 @@
- block:
- tempfile:
state: directory
suffix: supervisorctl-tests
register: supervisord_sock_path
- command: 'echo {{ output_dir }}'
register: echo
- set_fact:
@ -36,3 +41,7 @@
- 'uninstall_{{ ansible_distribution }}.yml' # CentOS
- 'uninstall_{{ ansible_os_family }}.yml' # RedHat
- 'uninstall_{{ ansible_system }}.yml' # Linux
- file:
path: '{{ supervisord_sock_path.path }}'
state: absent

View file

@ -3,7 +3,7 @@
name: 'pys:py1'
state: stopped
# test with 'server_url' parameter
server_url: 'unix://{{ remote_dir }}/supervisord.sock'
server_url: 'unix://{{ supervisord_sock_path.path }}/supervisord.sock'
register: result
when: credentials.username == ''
@ -12,7 +12,7 @@
name: 'pys:py1'
state: stopped
# test with unix socket
server_url: 'unix://{{ remote_dir }}/supervisord.sock'
server_url: 'unix://{{ supervisord_sock_path.path }}/supervisord.sock'
username: '{{ credentials.username }}'
password: '{{ credentials.password }}'
register: result_with_auth
@ -37,7 +37,7 @@
name: pys:py1
state: stopped
# test with 'server_url' parameter
server_url: 'unix://{{ remote_dir }}/supervisord.sock'
server_url: 'unix://{{ supervisord_sock_path.path }}/supervisord.sock'
register: result
when: credentials.username == ''
@ -46,7 +46,7 @@
name: pys:py1
state: stopped
# test with unix socket
server_url: 'unix://{{ remote_dir }}/supervisord.sock'
server_url: 'unix://{{ supervisord_sock_path.path }}/supervisord.sock'
username: '{{ credentials.username }}'
password: '{{ credentials.password }}'
register: result_with_auth

View file

@ -22,7 +22,7 @@ redirect_stderr=yes
programs=py1,py2
[unix_http_server]
file={{ remote_dir }}/supervisord.sock
file={{ supervisord_sock_path.path }}/supervisord.sock
{% if credentials.username is defined and credentials.username|default(false, boolean=true) %}
username = {{ credentials.username }}
password = {{ credentials.password }}
@ -36,7 +36,7 @@ password = {{ credentials.password }}
{% endif %}
[supervisorctl]
serverurl=unix://{{ remote_dir }}/supervisord.sock
serverurl=unix://{{ supervisord_sock_path.path }}/supervisord.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface