Skip to content
Snippets Groups Projects
Commit a1601566 authored by Benedetto Debora's avatar Benedetto Debora
Browse files

Refactoring: re-organized ansible files, update properties with new templates location

parent 6352cd7f
No related branches found
No related tags found
No related merge requests found
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/azurerm" {
version = "2.85.0"
constraints = "~> 2.65"
hashes = [
"h1:vNaBITW0Ds/fgAUZnyl4v9idIBSOqe4NlCXhMsM/CVw=",
"zh:03461c202d202732a5a770a159512664b635d144d10d707376c9a376deb80568",
"zh:248748c9dccf4efc65e323d651ecba18da067f33f41203b20a5364bd05d3f8ee",
"zh:2bedcf1a56e1d7ae5dbc1881ac404379abe908f2b63bfde710d52f1e3c0b4bcb",
"zh:495a861c19e6bd4c9c096f8ccba02f5d71e9f1abdb88493994f4b4f014897b44",
"zh:5660eddc6e5d78a80b0e748bed9fa16a406f6f3ddefdf1e4102353397a382fc9",
"zh:6384b8c5d986b221820a6daffebb26bc00537f9fe64cab65a573097245561890",
"zh:70155e6ce66ccc65d7d3ace9c2bb5f8f3575f595df0404b2e32dc342ae08c06b",
"zh:7b9e3a6b89862108e59b5aa2db189f6ac28688c4e84e6ad4ff0b777cdda35382",
"zh:844514a87268fc58238a9c337d3ce41e5a2923634b554e2d72e97d810153ff35",
"zh:a302d17e8a20e7e75b36a58e3aec0e5fb1f3134cd410a6790f857a734baadf80",
"zh:cb9313b00e8d9e4b3c4c2f93c4e529eb7c9805817e55afadb3ae80ff193d9663",
]
}
......@@ -6,3 +6,5 @@ sg = templates/terraform/open_stack/port_rule.tpl
[ansible.ubuntu]
nginx = templates/ansible/ubuntu/nginx.tpl
mysql = templates/ansible/ubuntu/mysql-play.tpl
wordpress = templates/ansible/ubuntu/wordpress-play.tpl
\ No newline at end of file
---
db_user: ###DB_USER###
db_password: ###DB_PASSWORD###
db_name: ###DB_NAME###
\ No newline at end of file
---
db_user: ###DB_USER###
db_password: ###DB_PASSWORD###
db_name: ###DB_NAME###
\ No newline at end of file
---
WORDPRESS_DB_HOST: ###WORDPRESS_DB_HOST###
WORDPRESS_DB_USER: ###WORDPRESS_DB_USER###
WORDPRESS_DB_PASSWORD: ###WORDPRESS_DB_PASSWORD###
WORDPRESS_DB_NAME: ###WORDPRESS_DB_NAME###
WORDPRESS_TABLE_PREFIX: ###WORDPRESS_TABLE_PREFIX###
\ No newline at end of file
---
- hosts: DB
become: yes
vars_files:
- mysql-vars.yml
pre_tasks:
- name: Install MySQL
......
......@@ -2,9 +2,6 @@
- hosts: DB
become: yes
vars_files:
- postgres-vars.yml
pre_tasks:
- name: "Install packages"
###OS###: "name={{ item }} state=present"
......
......@@ -2,9 +2,6 @@
- hosts: APP1
become: yes
vars_files:
- wordpress-vars.yml
pre_tasks:
- name: "Install packages"
###OS###: "name={{ item }} state=present"
......@@ -58,11 +55,11 @@
image: wordpress:5.8.0
state: started
env:
WORDPRESS_DB_HOST: "{{WORDPRESS_DB_HOST}}"
WORDPRESS_DB_USER: "{{WORDPRESS_DB_USER}}"
WORDPRESS_DB_PASSWORD: "{{WORDPRESS_DB_PASSWORD}}"
WORDPRESS_DB_NAME: "{{WORDPRESS_DB_NAME}}"
WORDPRESS_TABLE_PREFIX: "{{WORDPRESS_TABLE_PREFIX}}"
WORDPRESS_DB_HOST: "{{ wordpress_db_host }}"
WORDPRESS_DB_USER: "{{ wordpress_db_user }}"
WORDPRESS_DB_PASSWORD: "{{ wordpress_db_password }}"
WORDPRESS_DB_NAME: "{{ wordpress_db_name }}"
WORDPRESS_TABLE_PREFIX: "{{ wordpress_table_prefix }}"
ports:
- "8080:80"
volumes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment