You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/03/30 21:55:17 UTC
[airavata] branch develop updated (18cec90 -> f0636c5)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git.
from 18cec90 Merge branch 'master' into develop
add 0f57c46 Ansible: remove unintended file
add b47edb2 Merge branch 'airavata-3401'
add 802d5bf Merge branch 'airavata-3369'
new d89bf14 Ansible: integrating zabbix for ssl domain monitoring
new f0636c5 Merge branch 'check-ssl-domains' into develop
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../inventories/scigap/production/immune/vault.yml | 15 ---------------
dev-tools/ansible/roles/django/tasks/main.yml | 8 ++++++++
.../letsencrypt/tasks/files/check-domains.sh} | 20 ++++++++++++--------
dev-tools/ansible/roles/letsencrypt/tasks/main.yml | 8 ++++++++
4 files changed, 28 insertions(+), 23 deletions(-)
delete mode 100644 dev-tools/ansible/inventories/scigap/production/immune/vault.yml
copy dev-tools/ansible/{NOTE => roles/letsencrypt/tasks/files/check-domains.sh} (64%)
[airavata] 02/02: Merge branch 'check-ssl-domains' into develop
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit f0636c5a87cad3f2a331574006a726d0e23cdea2
Merge: 18cec90 d89bf14
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Mar 30 17:54:50 2021 -0400
Merge branch 'check-ssl-domains' into develop
.../inventories/scigap/production/immune/vault.yml | 15 -----------
dev-tools/ansible/roles/django/tasks/main.yml | 8 ++++++
.../roles/letsencrypt/tasks/files/check-domains.sh | 29 ++++++++++++++++++++++
dev-tools/ansible/roles/letsencrypt/tasks/main.yml | 8 ++++++
4 files changed, 45 insertions(+), 15 deletions(-)
[airavata] 01/02: Ansible: integrating zabbix for ssl domain
monitoring
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit d89bf14f001126c8eea064d3b2952ea0fc192df9
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Mar 30 17:54:31 2021 -0400
Ansible: integrating zabbix for ssl domain monitoring
---
dev-tools/ansible/roles/django/tasks/main.yml | 8 ++++++
.../roles/letsencrypt/tasks/files/check-domains.sh | 29 ++++++++++++++++++++++
dev-tools/ansible/roles/letsencrypt/tasks/main.yml | 8 ++++++
3 files changed, 45 insertions(+)
diff --git a/dev-tools/ansible/roles/django/tasks/main.yml b/dev-tools/ansible/roles/django/tasks/main.yml
index 007b448..935b973 100644
--- a/dev-tools/ansible/roles/django/tasks/main.yml
+++ b/dev-tools/ansible/roles/django/tasks/main.yml
@@ -310,3 +310,11 @@
state: absent
path: "{{ airavata_django_portal_tempdir.path }}"
run_once: true
+
+- name: add domain to Zabbix monitoring checklist
+ lineinfile:
+ path: /etc/zabbix/domain_checklist
+ line: "{{ vhost_servername }}"
+ create: yes
+ become: yes
+ when: vhost_ssl
diff --git a/dev-tools/ansible/roles/letsencrypt/tasks/files/check-domains.sh b/dev-tools/ansible/roles/letsencrypt/tasks/files/check-domains.sh
new file mode 100644
index 0000000..467c285
--- /dev/null
+++ b/dev-tools/ansible/roles/letsencrypt/tasks/files/check-domains.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+DOMAIN_CHECKLIST=/etc/zabbix/domain_checklist
+EXPIRES_IN_DAYS=28
+
+while IFS="" read domain; do
+ data=`echo |openssl s_client -servername $domain -connect $domain:443 2>/dev/null | openssl x509 -noout -checkend $(( $EXPIRES_IN_DAYS * 86400 )) 2>/dev/null && echo good || echo "$domain expires in less than $EXPIRES_IN_DAYS days"`
+ if [ "$data" != "good" ]; then
+ echo $data
+ fi
+done < $DOMAIN_CHECKLIST
diff --git a/dev-tools/ansible/roles/letsencrypt/tasks/main.yml b/dev-tools/ansible/roles/letsencrypt/tasks/main.yml
index 2f6ea87..afb118d 100644
--- a/dev-tools/ansible/roles/letsencrypt/tasks/main.yml
+++ b/dev-tools/ansible/roles/letsencrypt/tasks/main.yml
@@ -64,3 +64,11 @@
become: true
become_user: root
when: ansible_os_family == "RedHat"
+
+- name: copy check-domains.sh script (Zabbix remote command)
+ copy:
+ src: check-domains.sh
+ dest: /usr/local/bin/check-domains.sh
+ mode: 0755
+ become: yes
+ become_user: root