diff -r 2b3247d02769 -r f55970e41793 dev/provisioning/playbook.yml --- a/dev/provisioning/playbook.yml Wed Jun 24 01:36:46 2015 +0200 +++ b/dev/provisioning/playbook.yml Mon Oct 05 17:02:10 2015 +0200 @@ -35,8 +35,13 @@ - name: set .profile copy: src=files/.profile dest=/home/vagrant/.profile force=yes + - name: check yum base last update + stat: path=/var/cache/yum/x86_64/6/base/cachecookie + register: yum_cache_stat_base + - name: yum update yum: name=* update_cache=yes state=latest +# when: ansible_date_time.epoch|float - yum_cache_stat_base.stat.mtime > 60*60*12*24 - name: repo ignore outdated postgres base ini_file: @@ -66,6 +71,7 @@ - name: Install Remi repo. command: rpm -Uvh --force /tmp/remi-release-6.rpm creates=/etc/yum.repos.d/remi.repo + when: remi_repo.stat.exists == False - name : delete remi rpm file: path=/tmp/remi-release-6.rpm state=absent @@ -80,6 +86,7 @@ - name: Install postgres repo. command: rpm -Uvh --force /tmp/pgdg-centos94-9.4-1.noarch.rpm creates=/etc/yum.repos.d/pgdg-94-centos.repo + when: postgres_repo.stat.exists == False - name : delete postgres rpm file: path=/tmp/pgdg-centos94-9.4-1.noarch.rpm state=absent @@ -91,8 +98,13 @@ option: enabled value: 1 + - name: check yum epel last update + stat: path=/var/cache/yum/x86_64/6/epel/cachecookie + register: yum_cache_stat_epel + - name: yum update after repos yum: name=* update_cache=yes state=latest +# when: ansible_date_time.epoch|float - yum_cache_stat_epel.stat.mtime > 60*60*12*24 #TODO install alternative packages - name: install libs @@ -110,7 +122,7 @@ - php56-php-gd - php56-php-pgsql - java-1.8.0-openjdk - - tomcat6 + - tomcat ## php-fpm config @@ -208,13 +220,20 @@ - name: set JAVA_HOME lineinfile: - dest: /etc/tomcat6/tomcat6.conf - regexp: '^\#JAVA_HOME=' + dest: /etc/tomcat/tomcat.conf + regexp: '^\#?JAVA_HOME=' line: JAVA_HOME="/etc/alternatives/jre_1.8.0" state: present + - name: set parseBodyMethods to add POST + lineinfile: + dest: /etc/tomcat/server.xml + regexp: '^\s+\