correct issue
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2022-01-30 16:27:47 +01:00
parent 8ac27590ee
commit 6f041b9ef0

View File

@ -8,14 +8,14 @@
file: file:
path: "/var/{{supysonic_name}}" # required. Path to the file being managed. path: "/var/{{supysonic_name}}" # required. Path to the file being managed.
state: directory # not required. choices: absent;directory;file;hard;link;touch. If C(directory), all intermediate subdirectories will be created if they do not exist. Since Ansible 1.7 they will be created with the supplied permissions. If C(file), the file will NOT be created if it does not exist; see the C(touch) value or the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. Note that C(absent) will not cause C(file) to fail if the C(path) does not exist as the state did not change. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line). state: directory # not required. choices: absent;directory;file;hard;link;touch. If C(directory), all intermediate subdirectories will be created if they do not exist. Since Ansible 1.7 they will be created with the supplied permissions. If C(file), the file will NOT be created if it does not exist; see the C(touch) value or the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. Note that C(absent) will not cause C(file) to fail if the C(path) does not exist as the state did not change. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line).
become: yes become: true
- name: ensure venv folder exist - name: ensure venv folder exist
file: file:
name: "{{venv_location}}" name: "{{venv_location}}"
state: directory state: directory
mode: 0777 mode: 0777
become: yes become: true
notify: notify:
- restart supysonic service - restart supysonic service
@ -25,7 +25,7 @@
virtualenv: "{{venv_location}}{{supysonic_venv_name}}" virtualenv: "{{venv_location}}{{supysonic_venv_name}}"
virtualenv_command: /usr/bin/python -m venv virtualenv_command: /usr/bin/python -m venv
state: "{{'forcereinstall' if supysonic_force_site_update ==true else 'present'}}" state: "{{'forcereinstall' if supysonic_force_site_update ==true else 'present'}}"
become: yes become: true
- name: install sql client - name: install sql client
pip: pip:
@ -33,19 +33,19 @@
name: name:
- pymysql - pymysql
- psycopg2 - psycopg2
become: yes become: true
- name: apply config template - name: apply config template
template: template:
dest: "/etc/supysonic" # required. Location to render the template to on the remote machine. dest: "/etc/supysonic" # required. Location to render the template to on the remote machine.
src: "supysonic.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path. src: "supysonic.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path.
become: yes become: true
notify: notify:
- restart supysonic service - restart supysonic service
- restart daemon service - restart daemon service
- name: install gunicorn - name: install gunicorn
become: yes become: true
pip: pip:
virtualenv: "{{venv_location}}{{supysonic_venv_name}}" # not required. An optional path to a I(virtualenv) directory to install into. It cannot be specified together with the 'executable' parameter (added in 2.1). If the virtualenv does not exist, it will be created before installing packages. The optional virtualenv_site_packages, virtualenv_command, and virtualenv_python options affect the creation of the virtualenv. virtualenv: "{{venv_location}}{{supysonic_venv_name}}" # not required. An optional path to a I(virtualenv) directory to install into. It cannot be specified together with the 'executable' parameter (added in 2.1). If the virtualenv does not exist, it will be created before installing packages. The optional virtualenv_site_packages, virtualenv_command, and virtualenv_python options affect the creation of the virtualenv.
name: gunicorn # not required. The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of the remote package.,This can be a list (since 2.2) and contain version specifiers (since 2.7). name: gunicorn # not required. The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of the remote package.,This can be a list (since 2.2) and contain version specifiers (since 2.7).
@ -54,7 +54,7 @@
template: template:
dest: "/etc/systemd/system/supysonic-server.service" # required. Location to render the template to on the remote machine. dest: "/etc/systemd/system/supysonic-server.service" # required. Location to render the template to on the remote machine.
src: "systemd/supysonic-server.service.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path. src: "systemd/supysonic-server.service.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path.
become: yes become: true
notify: notify:
- Reload systemd - Reload systemd
- restart supysonic service - restart supysonic service
@ -63,7 +63,7 @@
template: template:
dest: "/etc/systemd/system/{{supysonic_name}}-daemon.service" # required. Location to render the template to on the remote machine. dest: "/etc/systemd/system/{{supysonic_name}}-daemon.service" # required. Location to render the template to on the remote machine.
src: "systemd/supysonic-daemon.service.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path. src: "systemd/supysonic-daemon.service.j2" # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path.
become: yes become: true
notify: notify:
- Reload systemd - Reload systemd
- restart daemon service - restart daemon service
@ -73,11 +73,11 @@
name: "{{supysonic_name}}-daemon.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service). name: "{{supysonic_name}}-daemon.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service).
enabled: true enabled: true
state: started state: started
become: yes become: true
- name: enable supysonic service - name: enable supysonic service
systemd: systemd:
name: "supysonic-server.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service). name: "supysonic-server.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service).
enabled: true enabled: true
state: started state: started
become: yes become: true