Set variable on specific package installation in CFEngine

0 votes
I need a script that supports two different servers i.e. fedora and centos, with different httpd packages. I'm using CFEngine to create the config file in which I need to add different sections to the file depending upon the version of httpd installed on the system. Is there any way I can set a variable to true/false depending on the variable to generate the file in the correct manner.
Aug 8, 2018 in DevOps Tools by DragonLord999
• 8,450 points
522 views

1 answer to this question.

0 votes

Try using packagesmatching to get the version of httpd installed right now. You'll have to combine it with ifelse, regcmp and strcmp in order to set different variables and classes you might use in your template.

answered Aug 8, 2018 by ajs3033
• 7,300 points

Related Questions In DevOps Tools

0 votes
1 answer

dpkg a deb file in a local fodler on vagrant

Copy the file in the vagrant folder ...READ MORE

answered Jun 14, 2018 in DevOps Tools by DareDev
• 6,890 points
668 views
0 votes
1 answer

How do I set maximum queue connection for nginx port in Windows?

Since increasing queue size did not fix your problem ...READ MORE

answered Aug 22, 2018 in DevOps Tools by Damon Salvatore
• 5,980 points
1,207 views
0 votes
1 answer
0 votes
1 answer

How to set quota for a project in Minishift?

Hi@akhtar, You can set a quota for a ...READ MORE

answered Aug 25, 2020 in DevOps Tools by MD
• 95,460 points
620 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,039 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Gunicorn stuck on docker when run is executed with flask application

Here's something that you could try: Check your ...READ MORE

answered Jun 14, 2018 in DevOps Tools by ajs3033
• 7,300 points
6,716 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP