更改由Puppet管理的nginx conf文件

时间:2016-09-26 18:57:21

标签: wordpress nginx ansible puppet certbot

我尝试在Ansible管理的多站点Worpress环境中使用certbot设置SSL。我查看了nginx文件夹,看起来像是一个由Puppet管理的自定义nginx配置文件。我添加SSL设置所需的服务器配置更改的正确方法是什么。

1 个答案:

答案 0 :(得分:0)

有很多选择。我将列出我使用的两个

file { '/etc/nginx/sites-available/default':
    content => template('module_name/nginx.conf.erb'),
    owner   => $user,
    group   => $groupname
  } 

OR

file_line{ 'Add line to file':
  path => '/path/to/file/',  
  line => "line to add",
  match   =>'regex for the line you want to replace' 
  }
相关问题