Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSkalny committed Apr 10, 2019
1 parent 4ef6bc2 commit 50aa074
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 14 deletions.
9 changes: 5 additions & 4 deletions deploy-cert/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ca_dir: "{{ root_dir }}/storage/ansible-simple-pki/{{ default_ca_host }}"
ca_dir: "{{ root_dir }}/storage/simple-pki/{{ default_ca_host }}"
type: "servers"
dest_name: "server"
ca_name: "ca.crt"
crt_name: "server.crt"
key_name: "server.key"
crt_name: "{{dest_name}}.crt"
key_name: "{{dest_name}}.key"
hostname: "{{ inventory_hostname }}"
cert_type: "sha256.4096"
14 changes: 7 additions & 7 deletions deploy-cert/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@

- name: deploy ca chain
copy:
src: "{{ ca_dir }}/ca/certs/chained-ca.{{ cert_type }}.crt"
src: "{{ ca_dir }}/ca/certs/chained-ca.{{simplepki_message_digest}}.{{ simplepki_key_size }}.crt"
dest: "{{ dest_dir }}/{{ ca_name }}"
when: ca_name is defined and ca_name != ""

- name: deploy server cert
- name: deploy cert
copy:
src: "{{ ca_dir }}/servers/certs/{{ hostname }}.{{ cert_type }}.crt"
src: "{{ ca_dir }}/{{ type }}/certs/{{ hostname }}.{{simplepki_message_digest}}.{{ simplepki_key_size }}.crt"
dest: "{{ dest_dir }}/{{ crt_name }}"
when: crt_name is defined and crt_name != ""

- name: deploy server key
- name: deploy key
copy:
src: "{{ ca_dir }}/servers/keys/{{ hostname }}.{{ cert_type }}.key"
src: "{{ ca_dir }}/{{ type }}/keys/{{ hostname }}.{{simplepki_message_digest}}.{{ simplepki_key_size }}.key"
dest: "{{ dest_dir }}/{{ key_name }}"
when: key_name is defined and key_name != ""

- name: deploy server pem
- name: deploy pem
copy:
src: "{{ ca_dir }}/servers/pem/{{ hostname }}.pem"
src: "{{ ca_dir }}/{{ type }}/pem/{{ hostname }}.pem"
dest: "{{ dest_dir }}/{{ pem_name }}"
when: pem_name is defined and pem_name != ""

1 change: 1 addition & 0 deletions monitor/client/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ monitor_user_parameters:
- sockstat.conf
- varnish.conf
- ntp.conf
- apt.conf

monitor_scripts:
- zabbix_mdraid.sh
Expand Down
6 changes: 6 additions & 0 deletions monitor/client/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
owner: "root"
mode: 0640

- name: enable periodic apt-get update
template:
src: "10periodic"
dest: "/etc/apt/apt.conf.d/10periodic"
owner: "root"

- name: install logging dependencies
package:
name: logrotate
Expand Down
4 changes: 4 additions & 0 deletions monitor/client/templates/10periodic
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
6 changes: 6 additions & 0 deletions monitor/client/templates/apt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Treat security and regular updates differently
# This is just a simulation, that can be run under zabbix user
# Since updating packages lists (apt-get update) requires root user,
# use APT::Periodic or some other functionality for that
UserParameter=apt.security,apt-get -s upgrade | grep -ci ^inst.*security | tr -d '\n'
UserParameter=apt.updates,apt-get -s upgrade | grep -iPc '^Inst((?!security).)*$' | tr -d '\n'
2 changes: 1 addition & 1 deletion openvpn-node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vpn_server_port: 1194 # default is 1194
use_tls_key: false # defines whether tls PSK is used to harden initial communication (openvpn --tls-auth)
# TODO: Implement creation of tls_key file from variable value
# tls_key_path: # needs to be filled on per-group basis if use_tls_key is enabled. Expects path to TLS PSK
enable_compresion: yes
enable_compresion: no
vpn_cipher: AES-256-CBC
script_security: 2

Expand Down
2 changes: 1 addition & 1 deletion openvpn-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
enabled: true
state: started


# todo autorestart a override na network-online.target
1 change: 1 addition & 0 deletions syslog-remote/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
syslog_remote_port: 514
2 changes: 1 addition & 1 deletion syslog-remote/templates/remote.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
destination d_remote {
network(
"{{ syslog_remote }}"
port(514)
port({{ syslog_remote_port }})
transport(tcp)
);
};
Expand Down

0 comments on commit 50aa074

Please sign in to comment.