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 best solutions below
Related Questions in APACHE
- .htaccess redirect 403 error files to 404 error document
- RestApi server code is not workinng
- Convert Apache VirtualHost to nginx Server Block for Dynamic Subdomains
- Looking the Method that MANUALLY INSTALL PHP on OSX Yosemite
- Premature end of script on VPS
- Rasterization with Javascript looks different on Apache server
- Vagrant - Ansible error installing Apache
- Can't use subdomain in Chrome using Apache (XAMPP)
- Django webapp (on an Apache2 server) hangs indefintely when importing nltk in views.py
- Redirect keystone app to sub directory using htaccess
- How can I integrate Solr5.1.0 with Nutch1.10
- Disconnect Client connected to cgi application
- Solr ping taking time during full import
- How to redirect an incoming request to specific serverName to different server in apache2?
- What is the correct way to link Django Flatpages?
Related Questions in HTTPD.CONF
- Apache Rewrite Rule to remove .php Extension adds multiple slashes
- Configure httpd.conf to add new site on Apache Red Hat Linux
- apache web server - bypass ldap authentication from within network
- Serving static files in apache returns 500 if file doesn't exist
- "No such file or directory" when using mod_cache
- Plugin to use gitolite's ACLs for CGIT/Apache httpd?
- Display 404 error document for invalid urls from apache without hitting rails application
- Bitnami djangostack Not serving any pages degault/app
- Restrict user file access via relative url
- mod-rewrite with apache 2.4 and CentOs 7 don't replace index.php in url
- WAMP : Forbidden You don't have permission to access / on this server. Apache/2.4.18 (Win64) PHP/5.6.19
- How to setup two virtual hosts in CentOS?
- Apache won't autoindex
- Changed mpm-worker 2.4 config but with no effect
- zabbix.conf redirect to another port
Related Questions in DEVOPS
- Error when adding a new build stage on Bluemix DevOps Services
- Capistrano current/ directory doesn't get created
- Using puppet to create a lvm with dynamic size
- Jenkins - (private subnet) WebHook with Github does not trigger automatic build
- How to automate the creation of a vCAP user-defined variable in a Bluemix deployment?
- Jenkins - Webhooks OR PollSCM
- Iterating over EncryptedDataBagItem in Chef Recipe
- add newly created AWS EC2 IP to Ansible inventory at runtime
- JazzHub and Bitbucket
- Continuous Deployment with Bitbucket and Jazzhub
- Jenkins - Access to build logs, artifacts, git-commit change logs of upstream builds
- Chef - difference between knife.rb and solo.rb
- What tools are there to visualise the merge structure of dozens of git branches?
- Using attributes in Chef
- Ansible error message
Related Questions in CFENGINE
- Configuration Management for Windows
- How to check current user with cfengine
- Manage authorized_keys using cfengine
- Is there an easy way for cfengine3 to copy different files based on the OS its running
- CFEngine 3.12: how to propagate templates to hosts?
- Cfengine vs Chef
- CFengine Redefinition of body "control" for "common" is a broken promise
- reparing user list on a linux system using cfengine
- Is there any way around the "no dots in hostnames" rule in CFEngine?
- CFEngine policy not executed on Ubuntu nodes
- Host group on CFEngine
- CFEngine. I want to distribute a set of files which are different for different versions of ubuntu for eg 13.04 and 14.04.
- CFEngine 3.5 Oracle JDK promise
- How to make an argument for why system build tools shouldn't automatically do SVN checkin
- cfengine 3.4 - cygwin build instructions
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)
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?
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.