A script needs to support two servers, Fedora and Centos, with different versions of httpd (Apache). CFEngine is used to create the configuration file and it needs to put different sections to the file depending on which httpd version is installed in the system. How can I set a variable to true/false depending on which version is installed so that I can then generate the file appropriately? All the examples I could find only deal with installing, upgrading or removing packages.
CFEngine - set variable if a specific package version is installed
242 views Asked by Greg At
2
There are 2 answers
Related Questions in APACHE
- Special access rule in an .htaccess file for IP addresses, authorized only for one directory structure
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Cannot load modules/mod_dav_svn.so into server
- How to ignore case in regexp mapping in a .htaccess rewrite rule?
- Oracle Http server ISNT-07551
- I cant access file directory with PHP local host on XAMPP. it just shows one of the files I have in my visual studio code
- Apache Reverse Proxy: only one proxy directive is working. Second one is ignored
- Issue with Django --> Apache WSGI deployment
- changing the node version used by apache web server
- Apache: How can I redirect to a subfolder with a URL param but serve required content via the main URL?
- Why/How does Apache auto-include "DHE" TLS1.2 ciphers while nginx needs "dhparams" file?
- Set up MX records in apache/Ubuntu to point to external mail server
- How to proxy to another port?
- Php can not upload file out of /var/www/html even after disabling Selinux
- Serve static site on S3 + CloudFlare with Apache retaining the source URL
Related Questions in HTTPD.CONF
- Moving a website from a subdomain to the domain root
- Apache deadlock when writing in file
- Getting Forbidden You don't have permission to access this resource error while depolye django project with apache and mod_wsgi
- apache reverseProxy how to proxypass to multi virtualhosts on same localhost and port?
- OpenID connect AzureAD redirect_uri is null
- cgit is not serving to the right path
- How to configure Apache to deploy a project with Django and React?
- Using Apache as Reverse Proxy to and from React
- authentication fails with ldap in SVN subversion
- Update httpd-apach 2.4.37 to 2.4.38 error on centos 8
- ColdFusion 2016 change location of served files to /var/www/html
- Reverse Proxy setup for Tomcat App on Subdomain
- set AllowOverride to All in Elastic Beanstalk
- PHP - Not working on Mac, showing directory listing instead of running index.php
- How to configure an Apache config on Windows with different php Version for different virtual hosts
Related Questions in DEVOPS
- Elasticbeanstalk FastAPI application is intermittently not responding to https requests
- Get current Timestamp in CET format and concatenate with string in yml file
- AWS EKS Fargate pod scheduling issue with Prometheus deployment
- Jenkins Docker Agent Configuration Issue: Connection Refused on Local Ubuntu Install
- Unable to use env variable from prd environment context
- Search to know the best way to do a " Database on demand " for a personal project
- Can I know the namespace of my k8s Pod only by looking at its IP?
- Struggling with Route53 public hosted zones in a multi-account environment
- "Backend call failure" error in Nextjs App deployed on Azure static web app
- Terraform: Error: Provider configuration not present. Module gets created, but when I remove or comment it throws an error
- Azure Dev Ops - Project - Mentions - Restrictions on Users and Groups
- How to Generate a Migration Script in the Azure DevOps
- Disable Azure DevOps Pull Request being completed when Using Copado
- How to add bulk users ( using a csv file ) to an AzureDevops Group using Powershell
- How to add .env file while deploying app using Jenkins Pipeline script from SCM?
Related Questions in CFENGINE
- CFEngine 3.12: how to propagate templates to hosts?
- ExecShellResult doesn't like my pipes
- cfEngine3 - class if package is installed
- Is there any difference between using "ifvarclass => 'class'" or "class::" notation when adding promises?
- CFEngine - set variable if a specific package version is installed
- how to cf-agent run with -D custom classes
- CFE syntax errors
- Learning CFEngine from 3.5 manual and operating in a 3.7 enviornment
- How to use parametrized bundles in cf-serverd?
- Is there any way around the "no dots in hostnames" rule in CFEngine?
- File copy using cf-engine from policy hub to hosts
- How to check current user with cfengine
- CFEngine match hostname in bundle agent
- Challenge response from CFEngine Server Failure while conencting cygwin to CFEngine
- How can CFEngine check that an upgrade is available for a package
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You could use
packagesmatchingto get the version of httpd that's currently installed. You might combine it withifelse,strcmp,regcmpso that you can set different variables and classes which you might use in your template.