Ask Your Question
0

E212 Can't open file for writing on Learning VM "cowsayings" task

asked 2016-09-26 19:25:04 -0500

jlackman gravatar image

My VM directions say this;

Cowsay

Let's start with cowsay. To use the cowsay command, you need to have the cowsay package installed. You can use a package resource to handle this installation, but you don't want to put that resource declaration just anywhere.

Task 1:

To keep things tidy, we'll create a cowsay.pp manifest, and within that manifest we'll define a class that can manage the cowsay package.

Use vim to create a cowsay.pp manifest:

vim cowsayings/manifests/cowsay.pp Enter the following class definition, then save and exit (:wq):

class cowsayings::cowsay { package { 'cowsay': ensure => present, provider => 'gem', } }

I do all that, and when exiting VIM I get this error; "cowsaysngs/manifestes/cowsay.pp" E212 Can't open file for writing> I think it has something do do with the path but cannot pinpoint the problem. Of course, since I'm messing with the learning VM, this is all pretty new to me

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-27 06:36:27 -0500

puser gravatar image

What user are you logged in as?

Do an

ls -l

On the directory that cowsayings.pp is in and see what permissions are available.

try

chmod 766 cowsayings.pp

and see if you can save it after that.

edit flag offensive delete link more

Comments

I'm logged in as root. One confusing thing is that the prior step says to path to ....environments/production/modules first but if I do a ls there, I don't see anything about cowsayings; I just see concat, docker, dockeragent, graphite, stdlib. How do you type code in the forum like you did?

jlackman gravatar imagejlackman ( 2016-09-27 10:04:48 -0500 )edit
0

answered 2016-09-29 12:19:41 -0500

Kevin gravatar image

updated 2016-09-29 12:23:01 -0500

I'm on the team that manages the learning VM. I'm aware of the issue and working on getting out a release today to address it. We had created the directory structure for that module during the build process, but unfortunately another step in the process now clears that directory in order to install another set of dependencies. For now, you can simple create the directories yourself: mkdir -p cowsayings/{manifests,examples} and you should be good to go.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-26 19:25:04 -0500

Seen: 118 times

Last updated: Sep 29 '16