From 536c808bd7897bed30a4549e647c1ee5531cf7ef Mon Sep 17 00:00:00 2001 From: davidl Date: Tue, 25 Jul 2023 12:51:47 +0200 Subject: [PATCH] clean --- hola | 0 hosts | 22 +++++++++++++++++++++- ping/ping.yml | 6 ++++++ playbooks/create_user_ssh/main.yml | 14 -------------- playbooks/create_user_ssh/main2.yml | 14 -------------- playbooks/site.yml | 14 -------------- playbooks/testsharding.yml | 17 ----------------- 7 files changed, 27 insertions(+), 60 deletions(-) delete mode 100644 hola create mode 100644 ping/ping.yml delete mode 100644 playbooks/create_user_ssh/main.yml delete mode 100644 playbooks/create_user_ssh/main2.yml delete mode 100644 playbooks/site.yml delete mode 100644 playbooks/testsharding.yml diff --git a/hola b/hola deleted file mode 100644 index e69de29..0000000 diff --git a/hosts b/hosts index 5d21a23..985f7f2 100644 --- a/hosts +++ b/hosts @@ -28,4 +28,24 @@ mongo2 [verdnatura_servers] -docker ansible_host=10.0.6.116 +docker ansible_host=10.0.6.116 +mox1 ansible_host=10.24.1.1 +mox2 ansible_host=10.24.1.2 +mox3 ansible_host=10.24.1.3 +mox4 ansible_host=10.24.1.4 +mox5 ansible_host=10.24.1.5 +ve3 ansible_host=10.24.2.3 +ve4 ansible_host=10.24.2.4 +ve5 ansible_host=10.24.2.5 +vcenter ansible_host=10.24.2.255 +mox1-ilo ansible_host=10.24.3.1 +mox2-ilo ansible_host=10.24.3.2 +mox3-ilo ansible_host=10.24.3.3 +mox4-ilo ansible_host=10.24.3.4 +mox5-ilo ansible_host=10.24.3.5 +ve3-ilo ansible_host=10.24.4.3 +ve4-ilo ansible_host=10.24.4.4 +ve5-ilo ansible_host=10.24.4.5 +mox91 ansible_host=10.29.1.91 +mox92 ansible_host=10.29.1.92 +mox93 ansible_host=10.29.1.93 diff --git a/ping/ping.yml b/ping/ping.yml new file mode 100644 index 0000000..1297429 --- /dev/null +++ b/ping/ping.yml @@ -0,0 +1,6 @@ +--- + +- hosts: all + gather_facts: false + tasks: + - ping: \ No newline at end of file diff --git a/playbooks/create_user_ssh/main.yml b/playbooks/create_user_ssh/main.yml deleted file mode 100644 index 10ff1f4..0000000 --- a/playbooks/create_user_ssh/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Install WordPress, MySQL, Nginx, and PHP-FPM - hosts: all - remote_user: root - # remote_user: user - # become: yes - # become_method: sudo - - roles: - - common - - mysql - - nginx - - php-fpm - - wordpress diff --git a/playbooks/create_user_ssh/main2.yml b/playbooks/create_user_ssh/main2.yml deleted file mode 100644 index 398d853..0000000 --- a/playbooks/create_user_ssh/main2.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- hosts: webservers #modify your server list - remote_user: root - - tasks: - - include_vars: users.yml - - name: Creating users to Jump Server - user: name="{{ item.username}}" - with_items: "{{ users }}" - - - name: Placing SSH Key to Authorized Key - #please note that this code assumes as if the public-private key pair is generated, all public users (created above) have public keys copied at one place i.e. keyfiles directory for the ease - authorized_key: user="{{item.username}}" key="{{ lookup('file', './keyfiles/authorized_keys.{{ item.username}}.pub')}}" - with_items: "{{ users }}" \ No newline at end of file diff --git a/playbooks/site.yml b/playbooks/site.yml deleted file mode 100644 index 10ff1f4..0000000 --- a/playbooks/site.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Install WordPress, MySQL, Nginx, and PHP-FPM - hosts: all - remote_user: root - # remote_user: user - # become: yes - # become_method: sudo - - roles: - - common - - mysql - - nginx - - php-fpm - - wordpress diff --git a/playbooks/testsharding.yml b/playbooks/testsharding.yml deleted file mode 100644 index dc8514d..0000000 --- a/playbooks/testsharding.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# The playbook creates a new database test and populates data in the database to test the sharding. - -- hosts: $servername - remote_user: root - tasks: - - name: Create a new database and user - mongodb_user: login_user=admin login_password=${mongo_admin_pass} login_port=${mongos_port} database=test user=admin password=${mongo_admin_pass} state=present - - - name: Pause for the user to get created and replicated - pause: minutes=3 - - - name: Execute the collection creation script - command: /usr/bin/mongo localhost:${mongos_port}/test -u admin -p ${mongo_admin_pass} /tmp/testsharding.js - - - name: Enable sharding on the database and collection - command: /usr/bin/mongo localhost:${mongos_port}/admin -u admin -p ${mongo_admin_pass} /tmp/enablesharding.js