Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not modify two different Listen directives #3

Closed
alaunay opened this issue Feb 2, 2016 · 1 comment
Closed

Can not modify two different Listen directives #3

alaunay opened this issue Feb 2, 2016 · 1 comment

Comments

@alaunay
Copy link

alaunay commented Feb 2, 2016

Hello,

In a default apache 2.4 ports.conf there is those directives:

Listen 80
<IfModule ssl_module>
    Listen 443
</IfModule>

As it's redefined elsewhere in our confs, I wanted to drop them both:

  apache_directive { 'Listen80':
    ensure => 'absent',
    name   => 'Listen',
    args   => '80',
    target => '/etc/apache2/ports.conf',
  }

  apache_directive { 'Listen443':
    ensure  => 'absent',
    name    => 'Listen',
    args    => '443',
    target  => '/etc/apache2/ports.conf',
    context => 'IfModule[arg="ssl_module"]',
  }

Unfortunately, with or without args, it gives an error on puppet execution:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Cannot alias Apache_directive[Listen443] to ["Listen"] at apache.pp:112; resource ["Apache_directive", "Listen"] already declared at apache.pp:105 at apache.pp:112:3 on node XXX

raphink on irc told me to open an issue, comment:
"probably not planned in the composite namevar"

raphink added a commit that referenced this issue Feb 15, 2016
@raphink
Copy link
Member

raphink commented Feb 15, 2016

This should be fixed by 183289f

@raphink raphink closed this as completed Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants