Compare commits
7 Commits
ccdf6fab93
...
54a6e007b6
Author | SHA1 | Date | |
---|---|---|---|
54a6e007b6 | |||
aaa3d221e1 | |||
4f85a73714 | |||
8b3ecdbb9c | |||
25bde1105f | |||
02919f87fc | |||
3bb250084a |
@ -19,16 +19,13 @@
|
|||||||
- id_ed25519
|
- id_ed25519
|
||||||
- id_rsa
|
- id_rsa
|
||||||
|
|
||||||
- name: create directories
|
- name: "create {{ autossh_etc_path }}"
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ autossh_etc_path }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
state: directory
|
state: directory
|
||||||
loop:
|
|
||||||
- "{{ autossh_etc_path }}"
|
|
||||||
- "{{ autossh_run_path }}"
|
|
||||||
|
|
||||||
- name: install package
|
- name: install package
|
||||||
package:
|
package:
|
||||||
|
@ -4,5 +4,6 @@ AUTOSSH_POLL=60
|
|||||||
AUTOSSH_FIRST_POLL=30
|
AUTOSSH_FIRST_POLL=30
|
||||||
AUTOSSH_GATETIME=0
|
AUTOSSH_GATETIME=0
|
||||||
AUTOSSH_PORT=22000
|
AUTOSSH_PORT=22000
|
||||||
|
AUTOSSH_PIDFILE={{ autossh_run_path }}/{{ item.name }}.pid
|
||||||
SSH_OPTIONS="{{ item.options | join(' ') }}"
|
SSH_OPTIONS="{{ item.options | join(' ') }}"
|
||||||
SSH_HOST={{ item.host }}
|
SSH_HOST={{ item.host }}
|
||||||
|
@ -10,9 +10,10 @@ Type=simple
|
|||||||
User={{ autossh_user }}
|
User={{ autossh_user }}
|
||||||
EnvironmentFile={{ autossh_etc_path }}/%i
|
EnvironmentFile={{ autossh_etc_path }}/%i
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/autossh -C -q -l {{ autossh_user }} -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no $SSH_OPTIONS $SSH_HOST
|
ExecStart=/usr/bin/autossh -M 0 -C -q -l {{ autossh_user }} -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no $SSH_OPTIONS $SSH_HOST
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=60
|
RestartSec=60
|
||||||
|
RuntimeDirectory=autossh
|
||||||
PIDFile={{ autossh_run_path }}/%i.pid
|
PIDFile={{ autossh_run_path }}/%i.pid
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -11,7 +11,6 @@ gitea_bin_path: /usr/local/bin
|
|||||||
gitea_var_path: /var/lib/gitea
|
gitea_var_path: /var/lib/gitea
|
||||||
gitea_log_path: /var/log/gitea
|
gitea_log_path: /var/log/gitea
|
||||||
gitea_etc_path: /etc/gitea
|
gitea_etc_path: /etc/gitea
|
||||||
gitea_run_path: /run/gitea
|
|
||||||
gitea_path: "{{ gitea_bin_path }}/gitea"
|
gitea_path: "{{ gitea_bin_path }}/gitea"
|
||||||
gitea_config_path: "{{ gitea_etc_path }}/app.ini"
|
gitea_config_path: "{{ gitea_etc_path }}/app.ini"
|
||||||
gitea_systemd_unit_path: /etc/systemd/system/gitea.service
|
gitea_systemd_unit_path: /etc/systemd/system/gitea.service
|
||||||
|
@ -58,14 +58,6 @@
|
|||||||
state: directory
|
state: directory
|
||||||
with_items: "{{ gitea_var_tree }}"
|
with_items: "{{ gitea_var_tree }}"
|
||||||
|
|
||||||
- name: "create {{ gitea_run_path }} path"
|
|
||||||
file:
|
|
||||||
path: "{{ gitea_run_path }}"
|
|
||||||
owner: "{{ gitea_user }}"
|
|
||||||
group: "{{ gitea_group }}"
|
|
||||||
mode: 0755
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: "create {{ gitea_log_path }} path"
|
- name: "create {{ gitea_log_path }} path"
|
||||||
file:
|
file:
|
||||||
path: "{{ gitea_log_path }}"
|
path: "{{ gitea_log_path }}"
|
||||||
|
@ -55,7 +55,7 @@ Group={{ gitea_group }}
|
|||||||
WorkingDirectory={{ gitea_var_path }}
|
WorkingDirectory={{ gitea_var_path }}
|
||||||
# If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
|
# If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
|
||||||
# (manually creating /run/gitea doesn't work, because it would not persist across reboots)
|
# (manually creating /run/gitea doesn't work, because it would not persist across reboots)
|
||||||
#RuntimeDirectory=gitea
|
RuntimeDirectory=gitea
|
||||||
ExecStart={{ gitea_path }} web --config {{ gitea_config_path }}
|
ExecStart={{ gitea_path }} web --config {{ gitea_config_path }}
|
||||||
Restart=always
|
Restart=always
|
||||||
Environment=USER={{ gitea_user }} HOME={{ gitea_home_path }} GITEA_WORK_DIR={{ gitea_var_path }}
|
Environment=USER={{ gitea_user }} HOME={{ gitea_home_path }} GITEA_WORK_DIR={{ gitea_var_path }}
|
||||||
|
@ -11,7 +11,7 @@ grafana_etc_path: /etc/grafana
|
|||||||
grafana_config_path: "{{ grafana_etc_path }}/grafana.ini"
|
grafana_config_path: "{{ grafana_etc_path }}/grafana.ini"
|
||||||
|
|
||||||
grafana_domain: "stats.{{ ansible_domain }}"
|
grafana_domain: "stats.{{ ansible_domain }}"
|
||||||
grafana_port: "stats.{{ ansible_domain }}"
|
grafana_port: 3002
|
||||||
grafana_user: grafana
|
grafana_user: grafana
|
||||||
grafana_group: grafana
|
grafana_group: grafana
|
||||||
|
|
||||||
|
@ -4,6 +4,20 @@
|
|||||||
rsyslog_default_rules_state: absent
|
rsyslog_default_rules_state: absent
|
||||||
when: rsyslog_archival_format_enabled
|
when: rsyslog_archival_format_enabled
|
||||||
|
|
||||||
|
- name: configure systemd tmpfiles.d
|
||||||
|
template:
|
||||||
|
src: tmpfiles_d-rsyslog.conf
|
||||||
|
dest: /etc/tmpfiles.d/00rsyslog.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: rsyslog_archival_format_enabled
|
||||||
|
|
||||||
|
- name: manage systemd tmpfiles.d override
|
||||||
|
file:
|
||||||
|
path: /etc/tmpfiles.d/00rsyslog.conf
|
||||||
|
state: "{{ rsyslog_archival_format_enabled | ternary('file', 'absent') }}"
|
||||||
|
|
||||||
- name: find default log files
|
- name: find default log files
|
||||||
find:
|
find:
|
||||||
path: /var/log
|
path: /var/log
|
||||||
|
@ -28,16 +28,16 @@ $FileOwner {{ rsyslog_file_owner }}
|
|||||||
$FileGroup {{ rsyslog_file_group }}
|
$FileGroup {{ rsyslog_file_group }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rsyslog_dir_owner is defined %}
|
{% if rsyslog_dir_owner is defined %}
|
||||||
$FileOwner {{ rsyslog_dir_owner }}
|
$DirOwner {{ rsyslog_dir_owner }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rsyslog_dir_group is defined %}
|
{% if rsyslog_dir_group is defined %}
|
||||||
$FileGroup {{ rsyslog_dir_group }}
|
$DirGroup {{ rsyslog_dir_group }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rsyslog_file_create_mode is defined %}
|
{% if rsyslog_file_create_mode is defined %}
|
||||||
$FileCreateMode {{ rsyslog_file_create_mode }}
|
$FileCreateMode {{ rsyslog_file_create_mode }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rsyslog_create_dirs is defined %}
|
{% if rsyslog_create_dirs is defined %}
|
||||||
CreateDirs {{ rsyslog_create_dirs | ternary('on', 'off') }}
|
$CreateDirs {{ rsyslog_create_dirs | ternary('on', 'off') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rsyslog_dir_create_mode is defined %}
|
{% if rsyslog_dir_create_mode is defined %}
|
||||||
$DirCreateMode {{ rsyslog_dir_create_mode }}
|
$DirCreateMode {{ rsyslog_dir_create_mode }}
|
||||||
|
3
roles/rsyslog/templates/tmpfiles_d-rsyslog.conf
Normal file
3
roles/rsyslog/templates/tmpfiles_d-rsyslog.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
d /var/log/syslog {{ rsyslog_dir_create_mode }} {{ rsyslog_dir_owner }} {{ rsyslog_dir_group }} -
|
Loading…
Reference in New Issue
Block a user