testing playbook. still not working. mysql module is making problems. need better understanding.

This commit is contained in:
CubelaPetar
2024-12-01 12:13:46 +01:00
parent 8eb001f390
commit d2ab787637
7 changed files with 34 additions and 21 deletions

View File

@@ -5,6 +5,7 @@
name:
- python3-apt
- python3-pycurl
- python3-pymysql
- name: Add ondrej repository for later versions of PHP.
apt_repository:
@@ -51,8 +52,8 @@
- inetutils-ping
- ldap-utils
- name: Disable the firewall (since this is behind a firewall)
service: name=ufw state=stopped
#- name: Disable the firewall (since this is behind a firewall)
# service: name=ufw state=stopped
- name: "Start Apache, MySQL, and PHP."
service: "name={{ item }} state=started enabled=yes"

View File

@@ -1,7 +1,16 @@
- name: Create a MySQL database for ownCloud.
mysql_user:
community.mysql.mysql_db:
name: owncloud
state: present
login_unix_socket: /run/mysqld/mysqld.sock
- name: Create a MySQL db user for ownCloud.
community.mysql.mysql_user:
name: "owncloud"
password: "{{ mysql_passwd }}"
login_user: "root"
login_password: "{{ mysql_passwd }}"
priv: "owncloud.*:ALL"
host: localhost
state: present
login_unix_socket: /run/mysqld/mysqld.sock

View File

@@ -3,6 +3,7 @@
ansible.builtin.get_url:
url: https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2
dest: "/tmp/owncloud-complete-latest.tar.bz2"
owner: www-data
- name: Extract the archive.
ansible.builtin.unarchive: