forked from rhpds/ocp-virt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlamp_stack.yml
49 lines (42 loc) · 1.12 KB
/
lamp_stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- name: Install LAMP Stack on RHEL 9
hosts: all
tasks:
- name: Register with activation key and auto attach subscriptions
community.general.redhat_subscription:
state: present
activationkey: "{{ key }}"
org_id: "{{ org_id }}"
- name: Install Apache
ansible.builtin.dnf:
name: httpd
state: present
- name: Install PHP and common modules
ansible.builtin.dnf:
name:
- php
- php-mysqlnd
- php-fpm
- php-opcache
- php-gd
- php-xml
- php-mbstring
state: present
- name: Install MariaDB
ansible.builtin.dnf:
name: mariadb-server
state: present
- name: Start and enable Apache
ansible.builtin.systemd_service:
name: httpd
state: started
enabled: true
- name: Start and enable MariaDB
ansible.builtin.systemd_service:
name: mariadb
state: started
enabled: true
- name: Restart Apache to load PHP modules
ansible.builtin.systemd_service:
name: httpd
state: restarted