Commit 34016715 authored by William Tucker's avatar William Tucker
Browse files

Added a check for old log pipes and updated log file for THREDDS

parent 126ca5f0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -32,6 +32,17 @@
        src: /dev/stderr
        force: yes

    - name: Get stats of a file
      stat:
        path: /esg/logs/fileserver/access.log
      register: log_file

    - name: Delete log pipe from previous playbook versions
      file:
        path: /esg/logs/fileserver/access.log
        state: absent
      when: log_file.stat.isfifo

    - name: Ensure access log file exists
      file:
        path: /esg/logs/fileserver/access.log
+15 −4
Original line number Diff line number Diff line
@@ -52,10 +52,21 @@
        - cache.log
        - localhost.log

    - name: Make the access log pipe
      command: mkfifo /esg/logs/thredds/localhost_access_log.txt
      args:
        creates: /esg/logs/thredds/localhost_access_log.txt
    - name: Get stats of a file
      stat:
        path: /esg/logs/thredds/localhost_access_log.txt
      register: log_file

    - name: Delete log pipe from previous playbook versions
      file:
        path: /esg/logs/thredds/localhost_access_log.txt
        state: absent
      when: log_file.stat.isfifo

    - name: Ensure access log file exists
      file:
        path: /esg/logs/thredds/localhost_access_log.txt
        state: touch

    - name: Transfer ownership of logs to security context user
      file: