我希望将添加到文件的内容缩进缩进,以便于阅读:
configure_max_upload:
file.line:
- name: /etc/apache2/sites-available/{{ pillar['apache']['domain'] }}.conf
- mode: ensure
- after: "php_admin_value upload_tmp_dir .*"
- indent: True
- content: |
php_admin_value upload_max_filesize 64M
php_admin_value post_max_size 64M
php_admin_value max_execution_time 300
php_admin_value max_input_time 300
- require:
- pkg: php_modules
此命令的输出如下所示:
<VirtualHost *:80>
DocumentRoot /var/www/peter/htdocs
ServerName www.example.com
<IfModule mpm_itk_module>
AssignUserId peter peter
</IfModule>
CustomLog "/var/www/peter/logs/access.log" combined
ErrorLog "/var/www/peter/logs/error.log"
php_admin_value error_log "/var/www/peter/logs/phperrors.log"
php_admin_value upload_tmp_dir "/var/www/peter/tmp/"
php_admin_value upload_max_filesize 64M
php_admin_value post_max_size 64M
php_admin_value max_execution_time 300
php_admin_value max_input_time 300
...
有人可以帮我吗,我认为肯定有一种简单的方法。 谢谢