Buggy Puppet tasks

@Goldenor and me faced issus with puppet tasks:
Confirmed buggy tasks are:

Basically you have to execute tasks on three application hosts. In all three cases tasks work fine (results are correct) but verification fails.
So far I could not get any attention from KodeKloud team so maybe someone from DevOps completed any of such task successfully ?

1 Like

Yeah me either, waiting for reply from Kke team,
@Devops_Engineers: if any member passed those tasks succefully inform us please

@Goldenor @andrzej

There are number of users who have passed those tasks as expected, there were some issues initially with some of them which were fixed already.
Some of those tasks are marked as Pending for you. Can you please try again and share exact steps (possibly with screenshots) how you are performing them if those fail again for you.

Thanks @Inderpreet ! I was one of the first with puppet tasks so maybe I was the victim of initial issues.
My steps are the same as KK in puppet for beginners course.
Create class definition with required name. Create site.pp with target nodes and class include.
On Agent site run puppet agent -tv. As you see in my screenshot all work fine except task validation :slight_smile:
Anyway I give it a try once more.
If you can eventually review what I wrote and check if validation works fine for such approach or maybe I have to change something.
I publish this topic asking others how they completed puppet tasks so far nobody answer so appreciate for any feedback.

The same issue “task: Puppet Manipulation String”

The right result and it fails again

Both worked for me. KKE added information that we should use only one file and do not create separate inventory. This is not according to course they provide for us and it is not recommended solution but I understand that task is going to test knowledge about performing automation with puppet so its fine for me.
For all my devops collegues. Do not create site.pp with inventory for puppet tasks, at least those two I faced.

1 Like

Puppet string replacement task completed successful for me too… no inventory require for default. Use directly with the file and file_line module.

node stapp03.stratos.xfusioncorp.com{}

1 Like

Thanks for the confirmation, is that manifest will work ?

file { ‘/opt/dba/news.txt’ :
ensure => present,
} ->
file_line { ‘/opt/dba/news.txt’:
path => ‘/opt/dba/news.txt’,
replace => true,
line => ‘Welcome to xFusionCorp Industries!’,
match => ‘Welcome to Nautilus Industries!’,

Yes that works. Just add the node details above where to be deployed. :slightly_smiling_face: :+1:

Actually it works without node part, at least for my two puppet tasks.

Yes it would work because I noticed that in that puppet task it was only one puppet-client assigned the puppet certificate therefore it will only apply on one server even if you dont define the node part.

But as a general rule its best to define the node details just in case it would be more then one puppet-clients in the list. :slightly_smiling_face:

It won’t work for me unfortunately

@Inderpreet can you check it please ?

I have the same behavior. please help @Inderpreet

Hi All
Finally I found the issue:
in the task it mentionned :
replace line Welcome to Nautilus Industries! to Welcome to xFusionCorp Industries! without space between “Industries” and “!”, either for the text file in the App server, but in the test section, a new file regenerated with spaces like that :

[[email protected] ~]# cat /opt/dba/blog.txt
This is Nautilus sample file, created using Puppet !
Welcome to xFusionCorp Industries !
Please do not modify this file manually !

So when we apply our manifest file the result seems like that :

This is Nautilus sample file, created using Puppet !
Welcome to xFusionCorp Industries !
Please do not modify this file manually !
Welcome to xFusionCorp Industries!

Cause the line that we mentionned is not the same as in the new file; so it fails
Now I’m confortable :smiley:

1 Like

Hello… Even i am facing issue for file_line replacement task using puppet.

Here are my screenshots. Note that I didn’t edit the txt file manually and it was only via puppet. There is no additional space before ! or anything. Also i used single pp file like mentioned in the task.

Even i copied the text and compared in notepad++ (before and after). I can only one word difference.

My PP file:
Screen Shot 06-28-20 at 03.28 PM

Still task is marked as failed. please let me know if I am still wrong.


@salilpune1 please give it another try.

1 Like

great!!.. thanks. I was able to complete the task!!

Can you please also look into below one if possbile: