Skip to content

Commit

Permalink
add ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
abolfazl8131 committed Sep 16, 2024
1 parent 20324c8 commit 9bcaea6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ "project_name":"deb_log",
{ "project_name":"AriaStack",
"mysql_root_password":"123",
"mysql_database":"db",
"mysql_username":"admin",
"mysql_password":"123",
"elasic_password":"123",
"elastic_password":"123",
"logstash_internal_password":"123",
"kibana_system_password":"123",
"metricbeat_internal_password":"123",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ansible
8 changes: 4 additions & 4 deletions {{cookiecutter.project_name}}/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MYSQL_ROOT_PASSWORD=123
MYSQL_DATABASE=db
MYSQL_USER=admin
MYSQL_PASSWORD=123
MYSQL_ROOT_PASSWORD={{cookiecutter.mysql_root_password}}
MYSQL_DATABASE={{cookiecutter.mysql_database}}
MYSQL_USER={{cookiecutter.mysql_username}}
MYSQL_PASSWORD={{cookiecutter.mysql_password}}

1 change: 1 addition & 0 deletions {{cookiecutter.project_name}}/ansible/install_on_remote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ansible-playbook -i inventory install_stack.yml
13 changes: 13 additions & 0 deletions {{cookiecutter.project_name}}/ansible/install_stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- hosts: all
tasks:

- name: copy artifacts
copy:
src: .
dest: stack


- name: run stack

shell: cd stack && sh run_stack.sh
2 changes: 2 additions & 0 deletions {{cookiecutter.project_name}}/ansible/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[servers]
localhost ansible_connection=local
1 change: 1 addition & 0 deletions {{cookiecutter.project_name}}/ansible/stop_on_remote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ansible-playbook -i inventory stop_stack.yml
6 changes: 6 additions & 0 deletions {{cookiecutter.project_name}}/ansible/stop_stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- hosts: all
tasks:

- name: stop stack
shell: cd stack && sh down_stack.sh
4 changes: 0 additions & 4 deletions {{cookiecutter.project_name}}/requirements.txt

This file was deleted.

0 comments on commit 9bcaea6

Please sign in to comment.