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
---
- 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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Don't Get Left Behind – Migrate To Rocky Linux 8 From Centos 8 Today!Creating Automatic Python Firewall Script in UbuntuStarting Using grep in LinuxUsing awk in Linux to create arrays and count in use login shellsFind Duplicate Files In Linux With Awk In Under A Minute!How To Use Podman ContainersLinux Command Line History GuruUnmasking the Linux UmaskSetting the Correct Permissions on Linux MountpointsUsing Firewalld Ipsets to Block Hackers on Rocky Linux 8.6Docker Security Exploits Using the Docker GroupUsing sed to Insert and Delete Lines in Linux Text FileUnderstanding Zombie Processes in LinuxUse Vagrant to Deploy Any Ansible Playbook to Install Terraform or Any Tooling You ChooseWorking with the UFW Firewall on Ubuntu automating entries using journalctl and awkWatch as we Install Ubuntu 22.04 the Jammy JellyfishUsing Vagrant with Hyper-V on Windows 10Using the Vagrant Ansible Local ProvisionerVagrant Libvirt Plugin to Manage KVM Virtual Machines on Ubuntu LinuxInstalling Vagrant and VirtualBox on Ubuntu