From 3a7fd20fff6b4988be7eee5129a83288c174d554 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Fri, 12 Jul 2019 01:53:48 -0400 Subject: [PATCH] Changed files for production use Properly excluded files needed for production. Moved group_vars to host_vars. Removed unneeded production.yml file and added a custom data directory location option for Nextcloud. --- .gitignore | 8 ++++++-- group_vars/all.yml | 13 ------------- production.yml | 29 ----------------------------- roles/nextcloud/tasks/main.yml | 3 ++- 4 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 group_vars/all.yml delete mode 100644 production.yml diff --git a/.gitignore b/.gitignore index c9252d8..01be70a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,10 @@ *.retry # Production files -group_vars/production.yml -group_vars/.gitignore +*.yml +host_vars/** + +# Testing env exceptions +!testing.yml +!./host_vars/all.yml diff --git a/group_vars/all.yml b/group_vars/all.yml deleted file mode 100644 index 9aa0407..0000000 --- a/group_vars/all.yml +++ /dev/null @@ -1,13 +0,0 @@ -## Nextcloud Configuration ## -nc_version: 16.0.3 -nc_sha256sum: a13f68ce47a1362318629ba5b118a59fa98358bb18f4afc371ea15104f2881f3 - -nc_domain: www.example.com -nc_docroot: /var/www/nextcloud - -nc_db: nextcloud -nc_db_user: nextcloud -nc_db_pass: nc+password - -nc_admin: admin -nc_admin_pass: ncadmin+password diff --git a/production.yml b/production.yml deleted file mode 100644 index 2d68fcc..0000000 --- a/production.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Freedom Cloud. Management code for a self-hosted file server. -# Copyright (C) 2019 Kris Lamoureux -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -- name: Install Backup Server - hosts: production - become: true - - pre_tasks: - - name: Install Ansible requirements - shell: apt-get update && apt-get install -y python-apt aptitude - args: - creates: /usr/lib/python2.7/dist-packages/apt/__init__.py - warn: false - - roles: - - nextcloud diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 9f25777..085fe68 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -83,7 +83,8 @@ --database-user "{{ nc_db_user }}" --database-pass "{{ nc_db_pass }}" --admin-user "{{ nc_admin }}" - --admin-pass "{{ nc_admin_pass }}"' + --admin-pass "{{ nc_admin_pass }}" + --data-dir "{{ nc_data }}"' register: nc_install args: warn: false