How to create dynamic directories using virtual resources?

asked 2017-09-01 15:51:36 -0600

netisopl516 gravatar image

So I would like to create some directories with my puppet module. (puppet 3.8)

something like /var/www/apps/app1 /var/www/apps/app2 var/www/apps/app3 etc

I figured i could accomplish this by creating some virtual resources and just calling them with the resource collector. however its just not working. After spending a couple days on this I'm out of ideas.

      @file {[
          ensure => directory,
          owner  => $config_owner,
          group  => $config_group,
          tag    => 'app_dir',1

and call it in multiple classes like

#                blahblah::test { 'app1': }
                File <| tag == app_dir |>

It hasn't worked the way I wanted it to. It only creates one directory. (/var/www/apps/app1) Am I missing something really obvious?

edit retag flag offensive close merge delete


I have never seen `tag => 'app_dir1, 1`. I am not sure what the `1` does. Try getting rid of it.

Red Cricket gravatar imageRed Cricket ( 2017-09-02 13:13:53 -0600 )edit

Looks like a typo when I wrote the post

netisopl516 gravatar imagenetisopl516 ( 2017-09-03 22:35:43 -0600 )edit