Skip to content

Commit

Permalink
Add nextcloud_configuration tag, improve check_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
peschmae committed Jan 15, 2024
1 parent d8e06da commit 00690ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasks/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
chdir: "{{ nextcloud_directory }}"
register: nextcloud_installed_apps
changed_when: false
check_mode: false

- name: Show installed apps
ansible.builtin.debug:
Expand Down
2 changes: 2 additions & 0 deletions tasks/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ansible.builtin.command: "{{ nextcloud_php_executable }} -r 'echo password_hash(\"{{ nextcloud_updatesecret }}\", PASSWORD_DEFAULT);'"
register: nextcloud_updatesecret_hashed_tmp
changed_when: false
check_mode: false

- name: Debug nextcloud_updatesecret_hashed
ansible.builtin.debug:
Expand All @@ -12,6 +13,7 @@
- name: Set hashed updater.secret
ansible.builtin.set_fact:
nextcloud_updatesecret_hashed: "{{ nextcloud_updatesecret_hashed_tmp.stdout }}"
check_mode: false

- name: Debug nextcloud_updatesecret_hashed
ansible.builtin.debug:
Expand Down
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
register: nextcloud_check_php
failed_when: nextcloud_check_php.rc != 0
changed_when: false
tags:
- nextcloud_configuration

- name: Check config.php is not empty
ansible.builtin.stat:
path: "{{ nextcloud_configuration }}"
register: nextcloud_config_file
changed_when: false
tags:
- nextcloud_configuration

- import_tasks: download.yml
when: "'isreg' not in nextcloud_config_file.stat"
Expand All @@ -19,6 +23,8 @@
when: "'isreg' not in nextcloud_config_file.stat"

- import_tasks: configuration.yml
tags:
- nextcloud_configuration

- include_tasks: applications.yml
with_items: "{{ nextcloud_apps }}"

0 comments on commit 00690ae

Please sign in to comment.