Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Clamav connection is set as TCP when running the role with archivematica_src_install_am=no #303

Open
mamedin opened this issue Aug 4, 2020 · 1 comment
Assignees

Comments

@mamedin
Copy link
Contributor

mamedin commented Aug 4, 2020

When running the role with archivematica_src_install_am=no, the CLAMAV_SOCKET_TYPE is set to tcp because the below task file is skipped:

https://github.com/artefactual-labs/ansible-archivematica-src/blob/qa/1.x/tasks/pipeline-osconf.yml#L59-L70

When clamav_uses_file_socket is not defined, the tcp socket is used because:

https://github.com/artefactual-labs/ansible-archivematica-src/blob/qa/1.x/templates/etc/sysconfig/archivematica-mcp-client.j2#L13-L15

@mamedin mamedin self-assigned this Aug 4, 2020
@mamedin
Copy link
Contributor Author

mamedin commented Aug 4, 2020

The following tasks should be moved to the tasks/pipeline-environment.yml file:

# check if ClamAV is running with file or tcp socket
- name: "Check if ClamAV is running with file or tcp socket"
  shell: cat /etc/clamav/clamd.conf /etc/clamd.conf 2> /dev/null | grep -Eq "^LocalSocket\ "
  register: clamavlocalsocket
  check_mode: no
  failed_when: clamavlocalsocket.rc > 1
  changed_when: false
  when: "not archivematica_src_mcpclient_clamav_use_tcp|bool"

- set_fact:
    clamav_uses_file_socket: true
  when: clamavlocalsocket.rc is defined and clamavlocalsocket.rc == 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant