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
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
65084a5d
Commit
65084a5d
authored
9 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Added stunnel installation.
parent
fe8619e3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
handlers/main.yml
+5
-0
5 additions, 0 deletions
handlers/main.yml
tasks/main.yml
+3
-0
3 additions, 0 deletions
tasks/main.yml
tasks/stunnel.yml
+44
-0
44 additions, 0 deletions
tasks/stunnel.yml
vars/main.yml
+15
-0
15 additions, 0 deletions
vars/main.yml
with
67 additions
and
0 deletions
handlers/main.yml
+
5
−
0
View file @
65084a5d
...
@@ -33,3 +33,8 @@
...
@@ -33,3 +33,8 @@
service
:
service
:
name
:
systemd-timesyncd
name
:
systemd-timesyncd
state
:
restarted
state
:
restarted
-
name
:
Restart stunnel
service
:
name
:
'
{{
stunnel_server[ansible_os_family]
}}'
state
:
restarted
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
3
−
0
View file @
65084a5d
...
@@ -56,5 +56,8 @@
...
@@ -56,5 +56,8 @@
-
include
:
lock_root.yml
-
include
:
lock_root.yml
when
:
lock_root|default(True) and not common_role_finished is defined
when
:
lock_root|default(True) and not common_role_finished is defined
-
include
:
stunnel.yml
when
:
stunnel|default(True) and not common_role_finished is defined
-
set_fact
:
-
set_fact
:
common_role_finished
:
True
common_role_finished
:
True
This diff is collapsed.
Click to expand it.
tasks/stunnel.yml
0 → 100644
+
44
−
0
View file @
65084a5d
---
-
assert
:
that
:
ansible_os_family in [ 'Debian', 'OpenBSD' ]
-
name
:
apt install stunnel
when
:
ansible_pkg_mgr == 'apt'
apt
:
name
:
stunnel4
state
:
present
update_cache
:
yes
cache_valid_time
:
3600
-
name
:
pkg install stunnel
when
:
ansible_pkg_mgr == 'openbsd_pkg'
openbsd_pkg
:
name
:
'
{{
openbsd_stunnel_version[ansible_os_family]
}}'
state
:
present
-
name
:
Configure stunnel
with_dict
:
syslog
:
yes
key
:
'
{{
tls_key_path
}}'
cert
:
'
{{
tls_cert_path
}}'
CAfile
:
'
{{
ca_store[ansible_os_family]
}}'
ciphers
:
'
!kRSA:!3DES:!RC4:!DES:!MD5:!aNULL:!NULL:AESGCM+ECDH:AES256+ECDH:AES128:+SHA1'
options
:
NO_SSLv2
options
:
NO_SSLv3
lineinfile
:
dest
:
/etc/stunnel/stunnel.conf
line
:
'
{{
item.key
}}
=
{{
item.value
}}'
regexp
:
'
^{{
item.key
}}
='
state
:
present
notify
:
-
Restart stunnel
-
name
:
Allow stunnel to access the TLS key
user
:
name
:
'
{{
stunnel_user[ansible_os_family]
}}'
groups
:
ssl-cert
append
:
yes
state
:
present
notify
:
-
Restart stunnel
This diff is collapsed.
Click to expand it.
vars/main.yml
+
15
−
0
View file @
65084a5d
...
@@ -31,7 +31,16 @@ openbsd_collectd_version:
...
@@ -31,7 +31,16 @@ openbsd_collectd_version:
'
5.7'
:
'
collectd-5.4.1p1'
'
5.7'
:
'
collectd-5.4.1p1'
'
5.8'
:
'
collectd-5.5.0p1'
'
5.8'
:
'
collectd-5.5.0p1'
openbsd_stunnel_version
:
'
5.5'
:
'
stunnel-4.56'
'
5.6'
:
'
stunnel-5.00p0'
'
5.7'
:
'
stunnel-5.06'
'
5.8'
:
'
stunnel-5.19'
openbsd_pkg_mirror
:
http://www.mirrorservice.org/pub
openbsd_pkg_mirror
:
http://www.mirrorservice.org/pub
ca_store
:
OpenBSD
:
/etc/ssl/cert.pem
Debian
:
/etc/ssl/certs/ca-certificates.crt
update_ca_certificates
:
update_ca_certificates
:
OpenBSD
:
/usr/local/sbin/update-ca-certificates
OpenBSD
:
/usr/local/sbin/update-ca-certificates
Debian
:
/usr/sbin/update-ca-certificates
Debian
:
/usr/sbin/update-ca-certificates
...
@@ -56,3 +65,9 @@ ntpd_service:
...
@@ -56,3 +65,9 @@ ntpd_service:
aliases_file
:
aliases_file
:
OpenBSD
:
/etc/mail/aliases
OpenBSD
:
/etc/mail/aliases
Debian
:
/etc/aliases
Debian
:
/etc/aliases
stunnel_service
:
OpenBSD
:
stunnel
Debian
:
stunnel4
stunnel_user
:
OpenBSD
:
_stunnel
Debian
:
stunnel4
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