present will make sure the package is installed. latest will make sure the latest version of the package is installed. absent will make sure the specified package is not installed.
# Make sure nmap is installed
- openbsd_pkg: name=nmap state=present
# Make sure nmap is the latest version
- openbsd_pkg: name=nmap state=latest
# Make sure nmap is not installed
- openbsd_pkg: name=nmap state=absent