
This validation will run only on RedHat OS family (CentOS, Fedora, ...). It calls the "rpm --verify|-V" command on the selected package, and return its status. Some notes: - if the package isn't installed, it will fail - if the package is present, but doesn't have the %verifyscript scriptlet, it won't fail - "become" is needed, especially if the verification script in the RPM calls some root-only things, such as "semodule" (this is the case for openstack-selinux, for instance) - if you set the validation to verbose, most of the output will be in the stdout - you therefore will have to go through the validation log to get the complete reason Change-Id: I7be310cac60b6729aa3c1a67f731421f85a78d80
Role Name
Call `rpm --verify '. Note that this validation only works for rhel-based systems, such as Enterprise Linux, CentOS, Fedora and so on.
Requirements
None
Role Variables
verify_package_pkg
: (str) Package name to verify
verify_package_verbose
: (bool) toggle verbose option for rpm
Dependencies
None
Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
vars:
verify_package_pkg: openstack-selinux
roles:
- verify_package
License
BSD