refactor: remove unnecessary PPA tasks - PHP 8.4 is already in Ubuntu 24.04 default repos
- Removed PHP PPA addition tasks from both playbooks - Simplified package installation (no external PPA needed) - PHP 8.4 available in Ubuntu 24.04 default repos
This commit is contained in:
@@ -80,7 +80,24 @@
|
|||||||
# These variables come from inventory/production.yml
|
# These variables come from inventory/production.yml
|
||||||
# wp_admin_user, wp_admin_password, wp_admin_email, wp_site_title
|
# wp_admin_user, wp_admin_password, wp_admin_email, wp_site_title
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# IMPORTANT: Pre-flight checks - create basic directory structure FIRST
|
||||||
|
- name: Ensure /var/www exists
|
||||||
|
file:
|
||||||
|
path: /var/www
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
tags: [preflight]
|
||||||
|
|
||||||
|
- name: Create web root directory
|
||||||
|
file:
|
||||||
|
path: /var/www/html
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
mode: '0755'
|
||||||
|
tags: [preflight]
|
||||||
|
|
||||||
# Package Installation
|
# Package Installation
|
||||||
- name: Update package cache
|
- name: Update package cache
|
||||||
apt:
|
apt:
|
||||||
@@ -88,9 +105,15 @@
|
|||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
- name: Install gnupg for PPA
|
- name: Install nginx first (required for web root)
|
||||||
|
apt:
|
||||||
|
name: nginx
|
||||||
|
state: present
|
||||||
|
tags: [packages, nginx]
|
||||||
|
|
||||||
|
- name: Install all required packages
|
||||||
package:
|
package:
|
||||||
name: gnupg
|
name: "{{ packages }}"
|
||||||
state: present
|
state: present
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
# Auto-Update Configuration
|
# Auto-Update Configuration
|
||||||
update_cron_enabled: true
|
update_cron_enabled: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# IMPORTANT: Pre-flight checks - create basic directory structure FIRST
|
# IMPORTANT: Pre-flight checks - create basic directory structure FIRST
|
||||||
- name: Ensure /var/www exists
|
- name: Ensure /var/www exists
|
||||||
file:
|
file:
|
||||||
@@ -102,12 +102,30 @@
|
|||||||
tags: [preflight]
|
tags: [preflight]
|
||||||
|
|
||||||
# Package Installation
|
# Package Installation
|
||||||
|
- name: Update package cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
tags: packages
|
||||||
|
|
||||||
|
- name: Install gnupg for PPA (required for apt-add-repository)
|
||||||
|
package:
|
||||||
|
name: gnupg
|
||||||
|
state: present
|
||||||
|
tags: packages
|
||||||
|
|
||||||
- name: Install nginx first (required for web root)
|
- name: Install nginx first (required for web root)
|
||||||
apt:
|
apt:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: present
|
state: present
|
||||||
tags: [packages, nginx]
|
tags: [packages, nginx]
|
||||||
|
|
||||||
|
- name: Install all required packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
tags: [packages, nginx]
|
||||||
|
|
||||||
- name: Install gnupg for PPA (required for apt-add-repository)
|
- name: Install gnupg for PPA (required for apt-add-repository)
|
||||||
package:
|
package:
|
||||||
name: gnupg
|
name: gnupg
|
||||||
|
|||||||
Reference in New Issue
Block a user