From 8de75415bedf53531d97e8f5a6e3428a88319de4 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 14 Nov 2021 11:40:31 +0100 Subject: [PATCH] linting --- tasks/main.yml | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index ab3a995..80ff617 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,34 +2,34 @@ # tasks file for supysonic - name: select specific Database tasks - include_tasks: "database_{{supysonic_DB_type}}.yml" + include_tasks: "database_{{ supysonic_DB_typ }}.yml" - name: create folder in var file: - 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). - become: yes + path: "/var/{{ supysonic_name }}" # required. Path to the file being managed. + state: directory + become: true - name: ensure venv folder exist file: - name: "{{venv_location}}" + name: "{{ venv_location }}" state: directory mode: 0777 - become: yes + become: true notify: - restart supysonic service - name: create venv pip: - name: "git+{{supysonic_repo}}" - virtualenv: "{{venv_location}}{{supysonic_venv_name}}" + name: "git+{{ supysonic_rep }}" + virtualenv: "{{ venv_locatio }}{{ supysonic_venv_nam }}" virtualenv_command: /usr/bin/python -m venv - state: "{{'forcereinstall' if supysonic_force_site_update ==true else 'present'}}" - become: yes + state: "{{ 'forcereinstall' if supysonic_force_site_update ==true else 'present'}}" + become: true - name: install sql client 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_locatio }}{{ supysonic_venv_nam }}" # 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: - pymysql - psycopg2 @@ -37,47 +37,47 @@ - name: apply config template template: - 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. - become: yes + dest: "/etc/supysonic" + src: "supysonic.j2" + become: true notify: - restart supysonic service - restart daemon service - name: install gunicorn - become: yes + become: true 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. - 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). + virtualenv: "{{ venv_locatio }}{{ supysonic_venv_nam }}" + name: gunicorn - name: apply systemd service template template: - 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. - become: yes + dest: "/etc/systemd/system/supysonic-server.service" + src: "systemd/supysonic-server.service.j2" + become: true notify: - Reload systemd - restart supysonic service - name: apply systemd daemon template template: - 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. - become: yes + dest: "/etc/systemd/system/{{ supysonic_nam }}-daemon.service" + src: "systemd/supysonic-daemon.service.j2" + become: true notify: - Reload systemd - restart daemon service - name: enable daemon service systemd: - 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_nam }}-daemon.service" enabled: true state: started become: yes - name: enable supysonic service 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" enabled: true state: started - become: yes + become: true