Bug 38745

Summary: apache2_module: падает с ошибкой, если модуль уже enabled
Product: Sisyphus Reporter: Alexander Makeenkov <amakeenk>
Component: ansibleAssignee: Andrey Cherepanov <cas>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: cas
Version: unstable   
Hardware: x86_64   
OS: Linux   
Bug Depends on: 39025    
Bug Blocks:    

Description Alexander Makeenkov 2020-07-22 16:48:58 MSK
Тестовый плейбук:

- hosts: test
  tasks:
      - name: Install apache2
        apt_rpm:
          pkg: apache2-base,apache2-mod_ssl
          state: present
          update_cache: yes
      - name: Enable apache2 modules
        apache2_module:
          state: present
          name: ssl

Запуск плейбука падает с ошибкой:

fatal: [hosta]: FAILED! => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "force": false, 
            "identifier": "ssl_module", 
            "ignore_configcheck": false, 
            "name": "ssl", 
            "state": "present"
        }
    }, 
    "msg": "Failed to set module ssl to enabled:\nModule ssl is already enabled!\nModule ssl installed;\n\trun service httpd2 condreload to fully enable.\n\nMaybe the module identifier (ssl_module) was guessed incorrectly.Consider setting the \"identifier\" option.", 
    "rc": 0, 
    "stderr": "", 
    "stderr_lines": [], 
    "stdout": "Module ssl is already enabled!\nModule ssl installed;\n\trun service httpd2 condreload to fully enable.\n", 
    "stdout_lines": [
        "Module ssl is already enabled!", 
        "Module ssl installed;", 
        "\trun service httpd2 condreload to fully enable."
    ]
}
Comment 1 Andrey Cherepanov 2020-10-02 18:01:45 MSK
Исправлено в apache2-base-2.4.46-alt2