Browse Source

Tweak fathom task

Thomas Buck 5 years ago
parent
commit
96696af9bc

+ 2
- 7
roles/blog/tasks/fathom.yml View File

50
     state=present
50
     state=present
51
     owner={{ fathom_db_username }}
51
     owner={{ fathom_db_username }}
52
 
52
 
53
-- name: Delete old fathom admin user account
54
-  become: true
55
-  become_user: "{{ main_user_name }}"
56
-  shell: fathom user delete --email="{{ fathom_admin_username }}"
57
-  args:
58
-    chdir: /home/{{ main_user_name }}/fathom-stats
59
-
60
 - name: Create fathom admin user account
53
 - name: Create fathom admin user account
61
   become: true
54
   become: true
62
   become_user: "{{ main_user_name }}"
55
   become_user: "{{ main_user_name }}"
63
   shell: fathom user add --email="{{ fathom_admin_username }}" --password="{{ fathom_admin_password }}"
56
   shell: fathom user add --email="{{ fathom_admin_username }}" --password="{{ fathom_admin_password }}"
64
   args:
57
   args:
65
     chdir: /home/{{ main_user_name }}/fathom-stats
58
     chdir: /home/{{ main_user_name }}/fathom-stats
59
+  ignore_errors: True
66
 
60
 
67
 - name: Add systemd service to start fathom automatically
61
 - name: Add systemd service to start fathom automatically
68
   template:
62
   template:
83
     dest=/etc/apache2/sites-available/fathom_{{ item.name }}.conf
77
     dest=/etc/apache2/sites-available/fathom_{{ item.name }}.conf
84
     owner=root
78
     owner=root
85
     group=root
79
     group=root
80
+  notify: restart apache
86
   with_items: "{{ virtual_domains }}"
81
   with_items: "{{ virtual_domains }}"
87
 
82
 
88
 - name: Enable Apache sites (creates new sites-enabled symlinks)
83
 - name: Enable Apache sites (creates new sites-enabled symlinks)

+ 1
- 1
roles/blog/templates/etc_systemd_system_fathom-stats.j2 View File

1
 [Unit]
1
 [Unit]
2
-Description=Starts the fathom server
2
+Description=fathom webtracking server
3
 Requires=network.target
3
 Requires=network.target
4
 After=network.target
4
 After=network.target
5
 
5
 

Loading…
Cancel
Save