環境
vagrant => centos6.7
ansible-role-php
こちらを使ってPHPを入れています。
ただバージョンが5.3なので5.6にしたいのですが方法が分かりません。
こちらのREADMEによると
php_enablerepo: ""
(RedHat/CentOS only) If you have enabled any additional repositories (might I suggest geerlingguy.repo-epel or geerlingguy.repo-remi), those repositories can be listed under this variable (e.g. remi-php70,epel). This can be handy, as an example, if you want to install the latest version of PHP 7.0, which is in the Remi repository.
解釈
ansible-role-repo-remiを使えとのことなのかと思いました。
php_packages_state: "installed"
If you have enabled any additional repositories such as geerlingguy.repo-epel or geerlingguy.repo-remi, you may want an easy way to swap PHP versions on the fly. By default, this is set to 'installed'. You can now override this variable to 'latest'. Combined with php_enablerepo, a user now doesn't need to manually uninstall the existing PHP packages before installing them from a different repository.
解釈
ansible-role-repo-remiを使う場合はこのステータスをlatest
にすればこのrolesでインストールされるはずのPHP(5.3)はインストールされることがない
変更内容
ansible-role-repo-remi
を追加する。
site.phpの記述を以下のように追加変更した。
- name: geerlingguy.repo-remi vars: ansible_distribution_major_version: 6 #CentOS6系 tags: - repo-remi - name: geerlingguy.php vars: php_enablerepo: "remi" php_packages_state: latest php_install_recommends: yes php_date_timezone: "Asia/Tokyo" tags: - php
geerlingguy.repo-remiにどのように記述したらよいか分かりません。
またこの方法で正しいのかどうかも定かではありません。
よろしくお願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。