Icinga / ansible-playbooks

Ansible Playbook for Icinga 2
GNU General Public License v2.0
225 stars 122 forks source link

Missing PHP timezone for IcingaWeb2 #69

Closed maccadia closed 6 years ago

maccadia commented 6 years ago

IcingaWeb2 setup complains about php timezone not set (http://[IP]/icingaweb2/setup > Modules).

The PHP config `date.timezone' is not defined.

Possible Solution

Something like this:

  tasks:
    - name: Timezone in php.ini
      lineinfile:
        path: /etc/php/7.0/apache2/php.ini
        regexp: '^;?date.timezone ='
        line: "date.timezone = \"{{ lookup('file', '/etc/timezone') }}\""
     notify: restart apache2

My Environment

ansible 2.4.3.0
python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
Ubuntu 16.04.4 LTS
aflatto commented 6 years ago

Hello This is being addressed by PR #66

maccadia commented 6 years ago

Thanks. I haven't checked there. I'm not a github master yet ;-)

Using ansible_fact is indeed better than file lookup.