Ansibleを使用してPHPのpost_max_sizeとupload_max_filesizeを変更する

Ansibleを使用してPHPのpost_max_sizeとupload_max_filesizeを変更する

Ansibleを使用して独立した方法で1つのバージョンpost_max_sizeで2つのよく知られているPHP変数を変更する方法はありますか?upload_max_filesizephp.ini

私はこれを扱う文献を見つけることができず、大きな会社だけでなく、どの会社もこれら2M2つの変数のデフォルトの限界値しか許可しないので、私にとって重要なようです。とても一般的です。)

ベストアンサー1

正規表現を使う代わりにhttps://docs.ansible.com/ansible/latest/modules/ini_file_module.html

- name: set PHP memory limit
  become: yes
  ini_file:
    path: /etc/php.ini
    section: PHP
    option: memory_limit
    value: 512M

おすすめ記事