I have to create api.conf in /etc/apache2/sites-available dir in a server(xyz02.software.com). The apache config is managed via apache module(apache::vhost) in role::script..so basically it is ///modules/role/manifest/script.pp......
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName xyz02.software.com
ErrorLog ${APACHE_LOG_DIR}/api-error.log
CustomLog ${APACHE_LOG_DIR}/api-access.log combined
apache::vhost { 'xyz02.software.com':
ensure => present,
port => 80,
docroot => /var/www,
serveradmin => webmaster@localhost,
servername => xyz02.software.com,
notify => [ Service['apache2'], ], }
when i write this in puppet this way, it create with name 25-xyz.software.com.conf while i have to get with name api.conf....I don't know how i should mention to get with api.conf name.....also this script create the file also in other servers like xyz01 and xyz03 which also shouldn't happen....Is their anything like if statement I should provide?