mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1134 from holta/kiwix-ansible-syntax
Kiwix: Ansible syntax/comments modernized
This commit is contained in:
commit
d7200469f9
2 changed files with 16 additions and 13 deletions
|
@ -83,7 +83,7 @@
|
|||
- rewrite
|
||||
when: is_debuntu
|
||||
|
||||
# 4. CREATE/ENABLE/DISABLE KIWIX SERVICE & ITS CRON JOB
|
||||
# 4. CREATE/ENABLE/RESTART (OR DISABLE) KIWIX SERVICE & ITS CRON JOB
|
||||
|
||||
- name: Create 'kiwix-serve' service and related files
|
||||
template:
|
||||
|
@ -101,10 +101,11 @@
|
|||
# - { src: 'iiab-make-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'}
|
||||
- { src: 'kiwix.conf.j2', dest: '/etc/{{ apache_config_dir }}/kiwix.conf', mode: '0644'}
|
||||
|
||||
- name: Enable Kiwix Proxy in Apache - is disabled by turning off kiwix service
|
||||
file: path=/etc/apache2/sites-enabled/kiwix.conf
|
||||
src=/etc/apache2/sites-available/kiwix.conf
|
||||
state=link
|
||||
- name: Enable Kiwix Proxy in Apache - is disabled by turning off kiwix service (debuntu)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/kiwix.conf
|
||||
path: /etc/apache2/sites-enabled/kiwix.conf
|
||||
state: link
|
||||
when: is_debuntu
|
||||
|
||||
- name: Enable 'kiwix-serve' service
|
||||
|
@ -141,8 +142,10 @@
|
|||
dest: /etc/crontab
|
||||
when: kiwix_enabled and is_redhat
|
||||
|
||||
- name: Restart apache, so it picks up kiwix.conf
|
||||
service: name={{ apache_service }} state=restarted
|
||||
- name: Restart Apache, so it picks up kiwix.conf
|
||||
service:
|
||||
name: "{{ apache_service }}"
|
||||
state: restarted
|
||||
|
||||
# 5. FINALIZE
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
|
||||
set_fact:
|
||||
kiwix_src_dir: "{{ kiwix_version_armhf }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
|
||||
kiwix_src_dir: "{{ kiwix_version_armhf }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
|
||||
when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
|
||||
|
||||
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
|
||||
set_fact:
|
||||
kiwix_src_dir: "{{ kiwix_version_linux64 }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
|
||||
kiwix_src_dir: "{{ kiwix_version_linux64 }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
|
||||
when: ansible_machine == "x86_64"
|
||||
|
||||
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
|
||||
set_fact:
|
||||
kiwix_src_dir: "{{ kiwix_version_i686 }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
|
||||
kiwix_src_dir: "{{ kiwix_version_i686 }}"
|
||||
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
|
||||
when: ansible_machine == "i686"
|
||||
# COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue