Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:25:30+00:00 2026-06-12T13:25:30+00:00

I am using Vagrant and Puppet to install Apache and PHP on Ubuntu. However

  • 0

I am using Vagrant and Puppet to install Apache and PHP on Ubuntu. However I am getting the error below during vagrant up. I think the path for the templates are correct, then why the error?

I’m using the setup here modified to ensure apt-get update runs before anything else

Error


←[1;35merr: /Stage[main]/Php/File[/etc/php5/apache2/apc.ini]/ensure: change from
absent to present failed: Could not set 'present on ensure: No such file or dir
ectory - /etc/php5/apache2/apc.ini.puppettmp_6187 at /tmp/vagrant-puppet/modules
-0/php/manifests/init.pp:44←[0m

←[1;35merr: /Stage[main]/Php/File[/etc/php5/apache2/php.ini]/ensure: change from
absent to present failed: Could not set 'present on ensure: No such file or dir
ectory - /etc/php5/apache2/php.ini.puppettmp_6687 at /tmp/vagrant-puppet/modules
-0/php/manifests/init.pp:36←[0m

/modules/php/manifests/init.pp

file { "/etc/php5/apache2/php.ini":
  ensure => present,
  mode => 644,
  content => template("php/etc/php5/conf.d/php.ini.erb"),
  require => Package["php5"],
  notify => Service["apache"];
}

file { "/etc/php5/apache2/apc.ini":
  ensure => present,
  mode => 644,
  content => template("php/etc/php5/conf.d/apc.ini.erb"),
  require => [ Package["php5"], Package["php-apc"], Package["apache"] ],
  notify => Service["apache"];
}

Templates

  • /modules/php/templates/etc/php5/conf.d/apc.ini.erb
  • /modules/php/templates/etc/php5/conf.d/php.ini.erb
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:25:31+00:00Added an answer on June 12, 2026 at 1:25 pm

    Are you sure Package[“php5”] it’s creating the path for you?

    It seems to me that it’s complaining because /etc/php5/apache2 folder does not exist when it tries to create the files from the templates.

    If you want to discard your puppetmaster side you can find puppetmaster process id and run:

    strace -v -f -ff -p $PID -o strace.log
    

    Then, run the agent again and go to puppetmaster and run:

    grep "etc/php5/apache2" strace.log.*
    

    If puppetmaster it’s ok you will see the reading call without errors, else you will see that puppetmaster receives “no such file or directory” when trying to open the file. Anyway as you I don’t think the problem it’s with template call, seems ok to me,.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've only just started using Vagrant and Chef, but Im getting what I think
I've been trying to get apache to serve from /vagrant/ using puppet through vagrant,
I am using a vagrant/puppet to configure my testmachine, i am using it to
I'm using Vagrant with Chef to build a Ubuntu 12.04 virtual machine. I'm using
I'm using Vagrant to run an Ubuntu powered VirtualBox with Apache2. The webserver, among
I am using vagrant to run a lucid32 install. I have installed LAMP and
I am studying about VM and vagrant. I am getting network refuse error when
Getting started with using Vagrant for some Rails development. Going one step at a
I'm using Vagrant to start a VirtualBox VM in windows. In other platforms, I
I installed postgres on my VM using Vagrant and Chef and when I try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.