您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920
  1. ---
  2. - name: find apache php modules which are not of the selected version
  3. find:
  4. path: /etc/apache2/mods-enabled/
  5. file_type: link
  6. patterns: php*
  7. excludes: "php{{php_version}}*"
  8. register: _find_php_apache_mods
  9. - name: disable apache php modules which are not of the selected version
  10. file:
  11. path: "{{item}}"
  12. state: absent
  13. with_items: "{{ _find_php_apache_mods | json_query('files[].path') }}"
  14. - name: enable php apache module
  15. apache2_module:
  16. name: "php{{php_version}}"
  17. state: present