This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /wp-admin { | |
# Allow all in 172.168.1.0/24 subnet | |
allow 172.168.1.0/24; | |
# Deny for everyone else | |
deny all; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Location "/wp-admin"> | |
# Allow all in 172.168.1.0/24 subnet | |
Require host 172.168.1.0/24 | |
</Location> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSLProtocol TLSv1.2 | |
SSLHonorCipherOrder on | |
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssl_protocols TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Import MySQL database | |
hosts: dbhost | |
tasks: | |
- name: Start database import | |
## Assuming we already have a cnf file created with DB credentials. | |
shell: "mysql {{ MYSQL_DATABASE }} < /backups/database_dump.sql" | |
async: 2100 | |
poll: 0 | |
register: import_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update \ | |
&& apt-get install -y nginx \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | |
&& echo "daemon off;" >> /etc/nginx/nginx.conf | |
ADD default /etc/nginx/sites-available/default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: dev-server | |
gather_facts: no | |
remote_user: ubuntu | |
become: yes | |
tasks: | |
- name: Install docker and some dependencies | |
apt: | |
name: python3-pip, docker.io | |
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
all: | |
children: | |
dev-server: | |
hosts: <your remote server ip or hostname> | |
vars: | |
drupal_port: 80 | |
nginx_port: 80 | |
mysql_port: 3306 | |
mysql_root_pass: !vault | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: server | |
gather_facts: no | |
connection: local | |
vars: | |
nginx_port: 82 | |
roles: | |
- roles/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
vars: | |
nginx_port: 81 | |
children: | |
server: | |
hosts: "127.0.0.1" |
OlderNewer