-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lenhard Reuter
committed
Jun 27, 2023
1 parent
454b111
commit 06043c8
Showing
13 changed files
with
111 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exclude_paths: | ||
- .github | ||
- tests | ||
skip_list: | ||
- role-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/ansible-community/ansible-lint.git | ||
rev: v6.6.1 | ||
hooks: | ||
- id: ansible-lint | ||
files: \.(yaml|yml)$ | ||
- repo: https://github.com/ansible-community/ansible-lint.git | ||
rev: v6.17.2 | ||
hooks: | ||
- id: ansible-lint | ||
files: \.(yaml|yml)$ | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,3 @@ Installs and configures [horde webmail](https://www.horde.org/) | |
## License | ||
|
||
GPL-3.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
install_date: Wed Oct 12 12:22:08 2022 | ||
version: v1.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,55 @@ | ||
--- | ||
- name: Configurate horde | ||
ansible.builtin.template: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dst }}" | ||
mode: 0644 | ||
group: "{{ item.group | default('www-data') }}" | ||
loop: "{{ horde_templates_list }}" | ||
src: '{{ item.src }}' | ||
dest: '{{ item.dst }}' | ||
mode: '0644' | ||
group: "{{ item.group | default('www-data') }}" | ||
loop: '{{ horde_templates_list }}' | ||
notify: Restart services | ||
|
||
# Enable HTTPS | ||
- name: Copy certificate | ||
ansible.builtin.copy: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
mode: "{{ item.mode }}" | ||
loop: "{{ horde_certificate }}" | ||
src: '{{ item.src }}' | ||
dest: '{{ item.dest }}' | ||
mode: '{{ item.mode }}' | ||
loop: '{{ horde_certificate }}' | ||
|
||
- name: Remove default apache2 configs | ||
ansible.builtin.file: | ||
dest: /etc/apache2/{{ item }} | ||
state: absent | ||
dest: /etc/apache2/{{ item }} | ||
state: absent | ||
loop: | ||
- sites-available/000-default.conf | ||
- sites-enabled/000-default.conf | ||
- sites-available/default-ssl.conf | ||
- sites-enabled/default-ssl.conf | ||
- conf-available/php-horde.conf | ||
- conf-enabled/php-horde.conf | ||
- sites-available/000-default.conf | ||
- sites-enabled/000-default.conf | ||
- sites-available/default-ssl.conf | ||
- sites-enabled/default-ssl.conf | ||
- conf-available/php-horde.conf | ||
- conf-enabled/php-horde.conf | ||
notify: Restart apache2 | ||
|
||
- name: Ensure log directory exist | ||
ansible.builtin.file: | ||
path: "{{ horde_log_path }}" | ||
state: directory | ||
mode: 0750 | ||
path: '{{ horde_log_path }}' | ||
state: directory | ||
mode: '0750' | ||
|
||
- name: Activate apache2_modules | ||
community.general.apache2_module: | ||
name: "{{ item }}" | ||
state: present | ||
loop: "{{ horde_apache2modules }}" | ||
name: '{{ item }}' | ||
state: present | ||
loop: '{{ horde_apache2modules }}' | ||
become: true | ||
|
||
- name: Manual apache2 restart | ||
ansible.builtin.service: | ||
name: apache2 | ||
state: restarted | ||
name: apache2 | ||
state: restarted | ||
|
||
- name: Activate webmail | ||
ansible.builtin.command: a2ensite webmail | ||
args: | ||
creates: /etc/apache2/sites-enabled/webmail.conf | ||
creates: /etc/apache2/sites-enabled/webmail.conf | ||
notify: Restart apache2 | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,80 @@ | ||
--- | ||
|
||
- name: Check if horde pear channel is installed | ||
ansible.builtin.shell: | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list-channels | grep pear.horde.org | ||
executable: /usr/bin/bash | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list-channels | grep pear.horde.org | ||
executable: /usr/bin/bash | ||
register: channel_registered | ||
failed_when: channel_registered.rc >= 2 | ||
changed_when: channel_registered.stdout | ||
|
||
- name: Discover horde PEAR channel | ||
ansible.builtin.command: pear channel-discover pear.horde.org | ||
ansible.builtin.command: | ||
cmd: pear channel-discover pear.horde.org | ||
changed_when: false | ||
when: channel_registered.stdout == '' | ||
|
||
- name: Check if horde pear package is installed | ||
ansible.builtin.shell: | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list -c pear.horde.org | grep Horde_Role | ||
executable: /usr/bin/bash | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list -c pear.horde.org | grep Horde_Role | ||
executable: /usr/bin/bash | ||
register: package_installed | ||
failed_when: package_installed.rc >= 2 | ||
changed_when: package_installed.stdout == '' | ||
|
||
- name: Install horde package | ||
ansible.builtin.command: pear install horde/horde_role | ||
ansible.builtin.command: | ||
cmd: pear install horde/horde_role | ||
changed_when: false | ||
become: true | ||
when: package_installed.stdout == '' | ||
|
||
- name: Fix unexpected 'new' (T_NEW) error | ||
ansible.builtin.shell: | ||
cmd: | | ||
pear uninstall File_Fstab && \ | ||
pear uninstall Services_Weather && \ | ||
pear uninstall horde/Horde_Service_Weather | ||
executable: /usr/bin/bash | ||
ansible.builtin.command: | ||
cmd: | | ||
pear uninstall File_Fstab && \ | ||
pear uninstall Services_Weather && \ | ||
pear uninstall horde/Horde_Service_Weather | ||
executable: /usr/bin/bash | ||
changed_when: false | ||
|
||
- name: Execute Horde run scripts | ||
ansible.builtin.expect: | ||
args: | ||
command: pear run-scripts horde/horde_role | ||
responses: "{{ horde_run_scripts_responses }}" | ||
echo: true | ||
command: pear run-scripts horde/horde_role | ||
responses: '{{ horde_run_scripts_responses }}' | ||
echo: true | ||
register: run_scripts_install_result | ||
failed_when: run_scripts_install_result.rc != 0 and 'Install scripts complete' not in run_scripts_install_result.stdout | ||
failed_when: | ||
run_scripts_install_result.rc != 0 and 'Install scripts complete' not in | ||
run_scripts_install_result.stdout | ||
become: true | ||
|
||
- name: Check if horde pear webmail is installed | ||
ansible.builtin.shell: | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list -c pear.horde.org | grep webmail | ||
executable: /usr/bin/bash | ||
cmd: | | ||
set -o pipefail && \ | ||
pear list -c pear.horde.org | grep webmail | ||
executable: /usr/bin/bash | ||
register: webmail_package_installed | ||
failed_when: webmail_package_installed.rc >= 2 | ||
changed_when: webmail_package_installed.stdout == '' | ||
|
||
- name: Install horde webmail | ||
ansible.builtin.command: pear install -a -B --force horde/webmail | ||
ansible.builtin.command: | ||
cmd: pear install -a -B --force horde/webmail | ||
changed_when: false | ||
become: true | ||
when: webmail_package_installed.stdout == '' | ||
|
||
- name: Fixing syntax error in a dependency PHP module. | ||
ansible.builtin.command: sed -i '167s/&//' /usr/share/php/Services/Weather.php | ||
ansible.builtin.command: | ||
cmd: sed -i '167s/&//' /usr/share/php/Services/Weather.php | ||
changed_when: false | ||
when: package_installed.stdout == '' | ||
tags: | ||
- skip_ansible_lint | ||
- skip_ansible_lint | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ $servers['imap'] = array( | |
IMP_Mailbox::MBOX_SENT => 'Sent', | ||
), | ||
'autocreate_special' => true, | ||
); | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ class Horde_Hooks | |
} | ||
return ''; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters