Skip to content

Commit

Permalink
Optimized and a bit testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Aug 9, 2016
1 parent e5c5f0c commit fb25e78
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ owncloud__apt_preferences__dependent_list:
owncloud__apt_preferences__dependent_list_optional:

- package: 'owncloud owncloud*'
reason: 'Use download.owncloud.org even when foreign sources are disabled by global APT preferences.'
pin: 'origin "download.owncloud.org"'
priority: 995
by_role: 'debops.owncloud'
Expand Down
3 changes: 2 additions & 1 deletion tasks/run_occ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
environment: '{{ owncloud__occ_item.env|d({}) }}'
## TODO: Upstream needs to fix this. See above.
changed_when: False
# changed_when: (owncloud__occ_item.command|d(omit) | match("config:app:set") and
## Has changed in ownCloud 9.0 and does not work anymore.
# changed_when: ('No such app enabled:' not in owncloud__occ_run.stdout and
# ' already ' not in owncloud__occ_run.stdout)
failed_when: ((owncloud__occ_run.rc != 0 and 'already exists' not in owncloud__occ_run.stdout) or
('An unhandled exception has been thrown:' in owncloud__occ_run.stdout))
## ownCloud 8.0.11-1.1: An unhandled exception has been thrown
# no_log: True
no_log: True
register: owncloud__occ_run
become_user: '{{ owncloud__user }}'
when: owncloud__occ_item|d() and owncloud__occ_item.command|d("") != "" and (owncloud__occ_item.when|d(True) | bool)
Expand Down
13 changes: 12 additions & 1 deletion tasks/setup_owncloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

# .. ]]]

# ownCloud raw occ commands [[[
# ownCloud applications configuration [[[1

- name: Combine owncloud__apps_config variables
set_fact:
Expand Down Expand Up @@ -234,3 +234,14 @@
when: not (owncloud__auto_database_upgrade_enabled | bool)

# .. ]]]

# ownCloud integrity check [[[

# TODO: Enable.
# - name: Check ownCloud core integrity
# command: '{{ owncloud__occ_bin_file_path | quote }} integrity:check-core'
# register: owncloud__register_occ_integrity_check_core
# failed_when: (owncloud__register_occ_integrity_check_core.stdout_lines|length != 0)
# changed_when: False

# ]]]

0 comments on commit fb25e78

Please sign in to comment.