Skip to content

Commit

Permalink
Merge pull request #681 from roots/galaxy-roles-update
Browse files Browse the repository at this point in the history
Update galaxy roles for Ansible 2.2 compatibility
  • Loading branch information
fullyint authored Nov 5, 2016
2 parents 1040828 + 1739011 commit a212765
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Update galaxy roles for Ansible 2.2 compatibility ([#681](/~https://github.com/roots/trellis/pull/681))
* Update to WP-CLI 0.25.0 for WP 4.7 compat ([#673](/~https://github.com/roots/trellis/pull/673))
* Enable per-site setup for permalink structure ([#661](/~https://github.com/roots/trellis/pull/661))
* WP 4.6 Compat: set WP_HOME/SITEURL directly ([#647](/~https://github.com/roots/trellis/pull/647))
Expand Down
3 changes: 1 addition & 2 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
- { role: common, tags: [common] }
- { role: fail2ban, tags: [fail2ban] }
- { role: ferm, tags: [ferm] }
- { role: ntp }
- { role: ntp, tags: [ntp] }
- { role: sshd, tags: [sshd] }
- { role: mariadb, tags: [mariadb] }
- { role: ssmtp, tags: [ssmtp, mail] }
- { role: mailhog, tags: [mailhog, mail] }
- { role: php, tags: [php] }
- { role: memcached, tags: [memcached] }
Expand Down
3 changes: 2 additions & 1 deletion group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ composer_keep_updated: true
composer_global_packages:
- { name: hirak/prestissimo }
apt_cache_valid_time: 86400
default_timezone: Etc/UTC
ntp_timezone: Etc/UTC
ntp_manage_config: true
www_root: /srv/www
ip_whitelist:
- "{{ lookup('pipe', 'curl -4 -s https://api.ipify.org') }}"
Expand Down
8 changes: 1 addition & 7 deletions group_vars/development/mail.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# Documentation: https://roots.io/trellis/docs/mail/
mailhog_install_ssmtp: no
mail_admin: admin@example.dev
mail_hostname: example.dev
mail_smtp_server: localhost:1025
ssmtp_auth_method: ""
ssmtp_start_tls: 'no'
ssmtp_tls: 'no'
php_sendmail_path: "{{ mailhog_install_dir }}/mhsendmail"
12 changes: 6 additions & 6 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
- name: composer
src: geerlingguy.composer
version: 1.2.7
version: 1.5.0

- name: ntp
src: resmo.ntp
version: 0.3.0
src: geerlingguy.ntp
version: 1.3.0

- name: logrotate
src: nickhammond.logrotate
version: fc3ea4
version: e7a498d

- name: swapfile
src: kamaln7.swapfile
version: 0.4

- src: geerlingguy.daemonize
version: 1.1.0
version: 1.1.1

- name: mailhog
src: geerlingguy.mailhog
version: 1.1.0
version: 2.1.0
2 changes: 1 addition & 1 deletion roles/common/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ ansible_requirements:
- version: 2.1.0.0
operator: '!='

default_timezone: Etc/UTC
ntp_timezone: Etc/UTC
13 changes: 2 additions & 11 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,11 @@

- name: Validate timezone variable
stat:
path: /usr/share/zoneinfo/{{ default_timezone }}
path: /usr/share/zoneinfo/{{ ntp_timezone }}
register: timezone_path
changed_when: false

- name: Explain timezone error
fail:
msg: "{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php"
msg: "{{ ntp_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php"
when: not timezone_path.stat.exists

- name: Get current timezone
command: cat /etc/timezone
register: current_timezone
changed_when: false

- name: Set timezone
command: timedatectl set-timezone {{ default_timezone }}
when: current_timezone.stdout != default_timezone
2 changes: 1 addition & 1 deletion roles/php/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ php_sendmail_path: /usr/sbin/ssmtp -t
php_session_save_path: /tmp
php_upload_max_filesize: 25M
php_track_errors: 'Off'
php_default_timezone: '{{ default_timezone }}'
php_timezone: '{{ ntp_timezone }}'

php_opcache_enable: 1
php_opcache_enable_cli: 1
Expand Down
2 changes: 1 addition & 1 deletion roles/php/templates/php.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ session.save_path = {{ php_session_save_path }}
track_errors = {{ php_track_errors }}
upload_max_filesize = {{ php_upload_max_filesize }}
expose_php = Off
date.timezone = {{ php_default_timezone }}
date.timezone = {{ php_timezone }}

[mysqlnd]
mysqlnd.collect_memory_statistics = {{ php_mysqlnd_collect_memory_statistics }}
Expand Down

0 comments on commit a212765

Please sign in to comment.