title: Trying to install apache on CentOS7 using Chef
body: <p>I'm trying to use Chef on CentOS7 and I'm at the beginning ... following the tutorial I0m trying to install apache using this recipe.</p>
  
  <pre><code>package 'apache2' do
   action :install
  end
  
  service 'apache2' do
   action [:enable, :start]
  end
  
  file '/var/www/index.html' do
   content '&lt;html&gt;
             &lt;body&gt;
              &lt;h1&gt;Hello world!!&lt;/h1&gt;
             &lt;/body&gt;
            &lt;/html&gt;'
  end
  </code></pre>
  
  <p>When I try to execute I obtain this error ... </p>
  
  <pre><code>[osboxes@osboxes chef-repo]$ sudo chef-apply hello.rb 
  Recipe: (chef-apply cookbook)::(chef-apply recipe)
    * yum_package[apache2] action install
      * No candidate version available for apache2
      ================================================================================
      Error executing action `install` on resource 'yum_package[apache2]'
      ================================================================================
  
      Chef::Exceptions::Package
      -------------------------
      No candidate version available for apache2
  </code></pre>
  
  <p>The same if I use a simpler recipe like this</p>
  
  <pre><code>package 'apache2' 
  </code></pre>
  
  <p>My Chef client workstation installation is the following </p>
  
  <pre><code>[osboxes@osboxes chef-repo]$ chef --version
  Chef Development Kit Version: 3.0.36
  chef-client version: 14.1.12
  delivery version: master (7206afaf4cf29a17d2144bb39c55b7212cfafcc7)
  berks version: 7.0.2
  kitchen version: 1.21.2
  inspec version: 2.1.72
  </code></pre>