Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
25c0fdaa9b | ||
|
36874c851a | ||
|
8d82565aaa |
1
sio2/sisr/45-ansible/dokuw/invent
Normal file
1
sio2/sisr/45-ansible/dokuw/invent
Normal file
@@ -0,0 +1 @@
|
||||
doku
|
4
sio2/sisr/45-ansible/dokuw/local.yml
Normal file
4
sio2/sisr/45-ansible/dokuw/local.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- web
|
||||
- doku
|
59
sio2/sisr/45-ansible/dokuw/roles/doku/tasks/main.yml
Normal file
59
sio2/sisr/45-ansible/dokuw/roles/doku/tasks/main.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
- name: recuperation dokuwiki-stable.tgz depuis machine depl
|
||||
get_url:
|
||||
url: http://depl.sio.lan/store/dokuwiki-stable.tgz
|
||||
dest: /tmp
|
||||
|
||||
- name: Extraction archive
|
||||
unarchive:
|
||||
src: /tmp/dokuwiki-stable.tgz
|
||||
dest: /var/www/html/
|
||||
remote_src: yes
|
||||
|
||||
- name: stat rept
|
||||
stat:
|
||||
path: /var/www/html/dokuwiki-2020-07-29
|
||||
register: rept_stat
|
||||
|
||||
- name: Renommage de dokuwiki-stable
|
||||
command: mv /var/www/html/dokuwiki-2020-07-29 /var/www/html/doku
|
||||
when: rept_stat.stat.exists
|
||||
|
||||
- name: Droit root recursive
|
||||
file:
|
||||
path: /var/www/html/doku
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: droit 755
|
||||
file:
|
||||
path: /var/www/html/doku
|
||||
state: directory
|
||||
mode: '0755'
|
||||
recurse: yes
|
||||
|
||||
- name: droit apache data
|
||||
file:
|
||||
path: /var/www/html/doku/data
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
recurse: yes
|
||||
|
||||
- name: droit apache lib
|
||||
file:
|
||||
path: /var/www/html/doku/lib
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
recurse: yes
|
||||
|
||||
- name: droit apache conf
|
||||
file:
|
||||
path: /var/www/html/doku/conf
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
recurse: yes
|
||||
|
25
sio2/sisr/45-ansible/dokuw/roles/web/tasks/main.yml
Normal file
25
sio2/sisr/45-ansible/dokuw/roles/web/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
- name: installation apache2
|
||||
apt:
|
||||
name: apache2
|
||||
state: present
|
||||
|
||||
- name: installation php
|
||||
apt:
|
||||
name: php
|
||||
state: present
|
||||
|
||||
- name: installation php-mbstring
|
||||
apt:
|
||||
name: php-mbstring
|
||||
state: present
|
||||
|
||||
- name: installation php-gd
|
||||
apt:
|
||||
name: php-gd
|
||||
state: present
|
||||
|
||||
- name: installation php-xml
|
||||
apt:
|
||||
name: php-xml
|
||||
state: present
|
||||
|
31
sio2/sisr/45-ansible/tpansible/squid.yml
Normal file
31
sio2/sisr/45-ansible/tpansible/squid.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
- hosts: adm
|
||||
vars:
|
||||
- proxy_port: 8080
|
||||
- proxy_mem: 128
|
||||
|
||||
tasks:
|
||||
- name: Installation squid
|
||||
apt:
|
||||
name: squid
|
||||
state: present
|
||||
|
||||
- name: Copie squid.conf squid.conf.j2
|
||||
template:
|
||||
src: squid.conf.j2
|
||||
dest: /etc/squid/squid.conf
|
||||
notify:
|
||||
- restart squid
|
||||
|
||||
# - name: On ajoute http_access allow localnet
|
||||
# replace:
|
||||
# path: /etc/squid/squid.conf
|
||||
# regexp: '^#http_access allow localnet'
|
||||
# replace: 'http_access allow localnet'
|
||||
# notify:
|
||||
# - restart squid
|
||||
|
||||
handlers:
|
||||
- name: restart squid
|
||||
service:
|
||||
name: squid
|
||||
state: restarted
|
1
sio2/sisr/50-wireguard/wg-private.key
Normal file
1
sio2/sisr/50-wireguard/wg-private.key
Normal file
@@ -0,0 +1 @@
|
||||
SBGswrABm13tZGpO70WKZjCtEF4YcGlJkBXORNgkJHE=
|
1
sio2/sisr/50-wireguard/wg-public.key
Normal file
1
sio2/sisr/50-wireguard/wg-public.key
Normal file
@@ -0,0 +1 @@
|
||||
pKM5noo3ZF3v3t3fBJBYzvFt61ItJxIkEHC0uXkCgAU=
|
14
sio2/sisr/50-wireguard/wg0.conf
Normal file
14
sio2/sisr/50-wireguard/wg0.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
# générer des clés : cd /etc/wireguard; umask 077 ; wg genkey | tee private.key | wg pubkey > public.key
|
||||
[Interface]
|
||||
Address = 10.0.2.1/24 # Adresses autorisées dans le VPN
|
||||
Listenport = 51820
|
||||
|
||||
# clé privée de machine A (actuelle)
|
||||
PrivateKey = SBGswrABm13tZGpO70WKZjCtEF4YcGlJkBXORNgkJHE=
|
||||
# UDP service port; 51820 is a common choice for WireGuard
|
||||
ListenPort = 51820
|
||||
|
||||
[Peer]
|
||||
# clé publique de machine B (l'autre)
|
||||
PublicKey = qhiQishoQMM6Y/g7OnUeLNX5T2p0FQx2oq+F/qKQfVc=
|
||||
AllowedIPs = 10.0.2.1/24 # le peer peut acceder au serveur
|
Reference in New Issue
Block a user