Fichier Mission2
This commit is contained in:
parent
9f0082b1f2
commit
23ddc9a40d
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: test
|
|
||||||
remote_user: root
|
|
||||||
become: yes
|
|
||||||
become_method: sudo
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- tomcat
|
|
||||||
- mariadb
|
|
||||||
- mariadb_create_dump
|
|
||||||
- mariadb_create_usr
|
|
||||||
- mariadb_inject_dump
|
|
||||||
- openjdk
|
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Tomcat playbook
|
- name: Tomcat & MariaDB installation playbook
|
||||||
hosts: test
|
hosts: test
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
@ -11,5 +11,4 @@
|
|||||||
ui_admin_username: admin
|
ui_admin_username: admin
|
||||||
ui_admin_pass: root
|
ui_admin_pass: root
|
||||||
roles:
|
roles:
|
||||||
- tomcat
|
- InstallTomcatMariaDB
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: MariaDB playbook
|
- name: MariaDB création de compte et injection BDD playbook
|
||||||
hosts: test
|
hosts: test
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
@ -5,4 +5,4 @@
|
|||||||
- "{{ ansible_distribution }}{{ ansible_distribution_major_version }}.yml"
|
- "{{ ansible_distribution }}{{ ansible_distribution_major_version }}.yml"
|
||||||
- "{{ ansible_os_family }}.yml"
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- include_tasks: "tomcat-setup-{{ ansible_os_family }}.yml"
|
- include_tasks: "tomcat-mariadb-install.yml"
|
@ -55,13 +55,13 @@
|
|||||||
extra_opts: "--strip-components=1"
|
extra_opts: "--strip-components=1"
|
||||||
creates: /usr/share/tomcat/bin
|
creates: /usr/share/tomcat/bin
|
||||||
|
|
||||||
- name: Copie tomcat fichier service*
|
- name: Copie tomcat fichier service
|
||||||
template:
|
template:
|
||||||
src: templates/tomcat.service.j2
|
src: templates/tomcat.service.j2
|
||||||
dest: /etc/systemd/system/tomcat.service
|
dest: /etc/systemd/system/tomcat.service
|
||||||
when: ansible_service_mgr == "systemd"
|
when: ansible_service_mgr == "systemd"
|
||||||
|
|
||||||
- name: Démarrer et activé tomcat
|
- name: Démarrer et activer tomcat
|
||||||
service:
|
service:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
name: tomcat
|
name: tomcat
|
||||||
@ -83,3 +83,22 @@
|
|||||||
- /usr/share/tomcat/webapps/manager/META-INF/context.xml
|
- /usr/share/tomcat/webapps/manager/META-INF/context.xml
|
||||||
notify: restart tomcat
|
notify: restart tomcat
|
||||||
|
|
||||||
|
- name: "MYSQL - update cache"
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: "MYSQL - installation"
|
||||||
|
apt:
|
||||||
|
name: mariadb-server
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: "PYTHON3 - installation"
|
||||||
|
apt:
|
||||||
|
name: python3-pymysql
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: "MYSQL - démarrage de mysql"
|
||||||
|
service:
|
||||||
|
name: "mysqld"
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
@ -1,24 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: "MYSQL - update cache"
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
|
|
||||||
- name: "MYSQL - installation"
|
|
||||||
apt:
|
|
||||||
name: mariadb-server
|
|
||||||
state: latest
|
|
||||||
|
|
||||||
- name: "PYTHON3 - installation"
|
|
||||||
apt:
|
|
||||||
name: python3-pymysql
|
|
||||||
state: latest
|
|
||||||
|
|
||||||
- name: "MYSQL - démarrage de mysql"
|
|
||||||
service:
|
|
||||||
name: "mysqld"
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
||||||
- name: "MYSQL - creation base de données"
|
- name: "MYSQL - creation base de données"
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
name: sdis29
|
name: sdis29
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
- name: copie de la base de donnée
|
|
||||||
copy:
|
|
||||||
src: sdis29.sql
|
|
||||||
dest: /tmp
|
|
||||||
|
|
||||||
- name: Importation de la base de données
|
|
||||||
mysql_db:
|
|
||||||
name: sdis29
|
|
||||||
state: import
|
|
||||||
target: /tmp/sdis29.sql
|
|
||||||
login_user: dev
|
|
||||||
login_password: Azerty1+
|
|
||||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user