浏览代码

first commit

Laurent Hory 9 年之前
当前提交
00c8e0a632

+ 2 - 0
hosts

@@ -0,0 +1,2 @@
+[server]
+hory.me ansible_ssh_port=220

+ 11 - 0
playbook.yml

@@ -0,0 +1,11 @@
+- name: renew certificat of website
+  hosts: "{{ hosts }}"
+  remote_user: root
+  roles:
+    - www
+    - wiki
+    - monitor
+    - postfixadmin
+    - sound
+    - git
+    - demo

+ 2 - 0
roles/demo/tasks/main.yml

@@ -0,0 +1,2 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot-path /var/www/demo -d demo.hory.me --rsa-key-size 4096 --text"

+ 0 - 0
roles/demo/vars/main.yml


+ 2 - 0
roles/git/tasks/main.yml

@@ -0,0 +1,2 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot-path /var/www/git -d git.hory.me --rsa-key-size 4096 --text"

+ 0 - 0
roles/git/vars/main.yml


+ 2 - 0
roles/monitor/tasks/main.yml

@@ -0,0 +1,2 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot --webroot-path /var/www/monitor -d monitor.hory.me --rsa-key-size 4096 --text"

+ 0 - 0
roles/monitor/vars/main.yml


+ 3 - 0
roles/postfixadmin/tasks/main.yml

@@ -0,0 +1,3 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot --webroot-path /var/www/postfixadmin -d postfixadmin.hory.me --rsa-key-size 4096 --text"
+

+ 0 - 0
roles/postfixadmin/vars/main.yml


+ 6 - 0
roles/sound/tasks/main.yml

@@ -0,0 +1,6 @@
+- name: deactivate htaccess
+  command: 'mv /var/www/sound/demo/.htaccess /var/www/sound/demo/htaccess'
+- name: renewal certificat
+  command: '/root/certbot-auto certonly --renew-by-default -a webroot --webroot-path /var/www/sound -d sound.hory.me --rsa-key-size 4096 --text'
+- name: reactivate htaccess
+  command: 'mv /var/www/sound/demo/htaccess /var/www/sound/demo/.htaccess'

+ 0 - 0
roles/sound/vars/main.yml


+ 2 - 0
roles/wiki/tasks/main.yml

@@ -0,0 +1,2 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot --webroot-path /var/www/wiki -d wiki.hory.me --rsa-key-size 4096 --text"

+ 0 - 0
roles/wiki/vars/main.yml


+ 2 - 0
roles/www/tasks/main.yml

@@ -0,0 +1,2 @@
+- name: renewal certificat
+  command: "/root/certbot-auto certonly --renew-by-default -a webroot --webroot-path /var/www/site -d www.hory.me -d hory.me --rsa-key-size 4096 --text"

+ 0 - 0
roles/www/vars/main.yml