Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ansible
common
Commits
441bb173
Commit
441bb173
authored
9 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Syslog forwarding WIP.
parent
8fd46066
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
handlers/main.yml
+10
-0
10 additions, 0 deletions
handlers/main.yml
tasks/syslog_forward.yml
+22
-1
22 additions, 1 deletion
tasks/syslog_forward.yml
templates/forwarding.conf.j2
+9
-0
9 additions, 0 deletions
templates/forwarding.conf.j2
with
41 additions
and
1 deletion
handlers/main.yml
+
10
−
0
View file @
441bb173
...
@@ -3,3 +3,13 @@
...
@@ -3,3 +3,13 @@
-
name
:
Update CA store
-
name
:
Update CA store
command
:
/usr/sbin/update-ca-certificates
command
:
/usr/sbin/update-ca-certificates
-
name
:
Restart rsyslog
service
:
name
:
rsyslog
state
:
restarted
-
name
:
Restart syslogd
service
:
name
:
syslogd
state
:
restarted
This diff is collapsed.
Click to expand it.
tasks/syslog_forward.yml
+
22
−
1
View file @
441bb173
...
@@ -3,7 +3,28 @@
...
@@ -3,7 +3,28 @@
-
name
:
apt install rsyslog
-
name
:
apt install rsyslog
when
:
ansible_os_family == 'Debian'
when
:
ansible_os_family == 'Debian'
apt
:
apt
:
name
:
rsyslog
name
:
rsyslog
-gnutls
state
:
present
state
:
present
update_cache
:
yes
update_cache
:
yes
cache_valid_time
:
3600
cache_valid_time
:
3600
-
name
:
Configure rsyslog forwarding
when
:
ansible_os_family == 'Debian'
template
:
src
:
forwarding.conf.j2
dest
:
/etc/rsyslog.d/forwarding.conf.j2
owner
:
root
group
:
root
mode
:
'
0644'
notify
:
-
Restart rsyslog
-
name
:
Configure syslogd forwarding
when
:
ansible_os_family == 'OpenBSD'
lineinfile
:
dest
:
/etc/syslog.conf
line
:
'
*.*
@tls://{{
syslog_server}}'
regexp
:
'
^*.*
@'
state
:
present
notify
:
-
Restart syslogd
This diff is collapsed.
Click to expand it.
templates/forwarding.conf.j2
0 → 100644
+
9
−
0
View file @
441bb173
$DefaultNetstreamDriver gtls
$DefaultNetstreamDriverCAFile {{ tls_ca_cert_path }}
$DefaultNetstreamDriverCertFile {{ tls_cert_path }}
$DefaultNetstreamDriverKeyFile {{ tls_key_path }}
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeer {{ syslog_server }}
$ActionSendStreamDriverMode 1
*.* @@{{ syslog_server }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment