Загрузка страницы

Install MySQL 8 Using Ansible on Vagrant AlmaLinux 8 System

In this video we look at installing MySQL 8 on AlmaLinux 8 by using an Ansible Playbook. We start by using Vagrant and Install the epel repo and ansible using the shell provisioner. We could use the ansible provisioner or even ansible_local but we will choose to use ansible from the gust system after vagrant has started. The Playbook will instal MySQL and set the MySQL root account password. Of course we manage the service but additionally add a database and data and a test user account

---
- name: Install Pre-Reqs
hosts: localhost
gather_facts: false
become: true
tasks:
- name: Install Python3
dnf:
name: python3
state: present

- name: Install and Manage MySQL 8.0 AlmaLinux 8
hosts: localhost
become: false
vars:
- ansible_python_interpreter: /usr/bin/python3
- password: Password1
tasks:
- name: install python mysql connector
become: true
dnf:
name:
- python3-PyMySQL
- mysql-server
- mysql
state: present
- name: service
become: true
service:
name: mysqld
state: started
enabled: true
- name: root mysql
become: true
mysql_user:
login_user: root
login_password: "{{ password }}"
name: root
password: "{{ password }}"
check_implicit_admin: true
- name: import
mysql_db:
login_user: root
login_password: "{{ password }}"
name: all
state: import
target: "{{ item }}"
loop:
- /vagrant/sakila-schema.sql
- /vagrant/sakila-data.sql
- name: user mysql
mysql_user:
name: tux
host: localhost
password: "{{ password }}"
login_user: root
login_password: "{{ password }}"
priv: "sakila.*:SELECT,GRANT"
update_password: on_create

Additionally you can find my video courses on Pluralsight: http://pluralsight.com/training/Authors/Details/andrew-mallett and take time to see my own site http://www.theurbanpenguin.com
00:00 Introduction
01:06 Vagrantfile
02:12 View Ansible Playbook
07:02 Vagrant up
08:49 Execute Ansible Playbook
10:37 Test MySQL

-~-~~-~~~-~~-~-
Please watch: "RHCSA 9 Working With Podman Containers"
https://www.youtube.com/watch?v=piwcpd_hWn0
-~-~~-~~~-~~-~-

Видео Install MySQL 8 Using Ansible on Vagrant AlmaLinux 8 System канала theurbanpenguin
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
2 июня 2022 г. 17:42:37
00:11:52
Яндекс.Метрика