robertdebock/ansible-role-httpd

httpd_port not updated in ports.conf file (under Unbuntu)

Closed this issue · 4 comments

Hi !

I've used ansible-role-httpd to install and configure apache2 :

Exemple

  • name: Converge
    hosts: all
    become: yes
    gather_facts: yes
    vars:
    httpd_port: 8000
    httpd_vhosts:
    - name: docroot
    servername: www1.example.com
    documentroot: /var/www/html/www1.example.com

but the Listen (apache2 param) is not changed

Expected behavior
File /etc/apache2/ports.conf will be modified

Listen 80 <------ here must be 8000

Listen 443 Listen 443

Error
File ports.conf is not modified

Environment

  • Control node OS: Ubuntu 18.04.3 LTS
  • Control node Ansible version: 2.5.1 (python 2.7.15+)
  • Managed node OS: Ubuntu 18.04.3 LTS

Great work and thanks for this role !

Thanks for you issue, I think you are completely correct.

I'll write a fix for it a little later and close the issue once released.

Well. not an easy issue. Tests will run in a few minutes, it's quite a rewrite of the role, so may need a few commits to pass testing.

Once again; thanks for your input, it really helps to improve this role.

Solved by the last release.

This issue was not fixed after all. The last commit should fix that. Will release a new version soon.