testing playbook. still not working. mysql module is making problems. need better understanding.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
nocows = 1
|
||||
host_key_checking = false
|
||||
inventory = ./hosts.ini
|
||||
ansible_python_interpreter = /usr/bin/python3
|
||||
|
||||
[ssh_connections]
|
||||
pipelining = true
|
||||
|
||||
10
hosts.ini
10
hosts.ini
@@ -1,6 +1,6 @@
|
||||
[snipeit]
|
||||
10.0.101.15 ansible_user=root ansible_port=22
|
||||
|
||||
[sbx-srv-owncloud01]
|
||||
10.0.101.16 ansible_user=sbxadmin ansible_port=22
|
||||
#[snipeit]
|
||||
#10.0.101.15 ansible_user=root ansible_port=22
|
||||
#
|
||||
[owncloud]
|
||||
10.56.0.99 ansible_user=reliyya ansible_port=22
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
2
run.yml
2
run.yml
@@ -16,7 +16,7 @@
|
||||
# - role: ironicbadger.docker_compose_generator
|
||||
#
|
||||
|
||||
- hosts: sbx-srv-owncloud01
|
||||
- hosts: owncloud
|
||||
become: yes
|
||||
vars_files:
|
||||
- "vars/vault.yml"
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
61653539633662393863626638666466303131396237373661303939333263303033653638343235
|
||||
6437663430656538303865336663616432313832333532380a323632633339616466313038356239
|
||||
64623565623264303739633134656666363163613361306230343638346330383435623931373364
|
||||
3463643433323631650a613233353266333036643239366330613133643238626132336530653462
|
||||
37643966643663313964373531373731343064613461636564656332336461326235666264643030
|
||||
37663966626561343761623363346539333662613966366564323639306230626265343431366238
|
||||
63353531313165633365323439643033313536306330656332373162373733616338613561383233
|
||||
33376530636530376638383562373862633362366366333130633833633938613462613932313834
|
||||
61353563356361363338356665363364366166346534346137323661363464653934363638303766
|
||||
39633963626231373138636237326531353835343930643535313937656334613462626639326139
|
||||
61326665643862326365356165393361326266616530306330643665386663356536646337343061
|
||||
37353230653062616266
|
||||
64313562613766336237383361623333393830336465653361646334323034643831393230393737
|
||||
6538353232666230373434626365373632366265346230340a643739373735643232376564323335
|
||||
38613365393833316661643332303965653530393834653062636665613835353565643232373432
|
||||
3434333936396637340a613163333161393239636435633761316639666531633065323761333263
|
||||
62323930333162323137643939616266326333613034303339653762663566323862356136393665
|
||||
63653335396434613738626164653437613639336436613362666434343565343866336237633561
|
||||
36356139363939323635643862333730633638633139653364363435393761653131636635383765
|
||||
61663933376333663262373739643337336232323166306239616564363931366535626638626534
|
||||
66376436323735373634333164653437393830386333303034326461383062653930366437636234
|
||||
38626632653236346233636163646435313034656534623134626366663466636335313236323837
|
||||
35636531616531663663393636663735643236323234633833386463666131333036343562646539
|
||||
33343331646463613661316637653236633362393333346535376161626365643433616138663565
|
||||
3838
|
||||
|
||||
Reference in New Issue
Block a user