2.54. hammer policy
Manipulate policies
Usage:
hammer policy [OPTIONS] SUBCOMMAND [ARG] ...
Parameters:
SUBCOMMAND Subcommand
[ARG] ... Subcommand arguments
Subcommands:
create Create a Policy
delete, destroy Delete a Policy
hosts List all hosts
info, show Show a Policy
list, index List Policies
update Update a Policy
Options:
-h, --help Print help
Usage:
hammer policy [OPTIONS] SUBCOMMAND [ARG] ...
Parameters:
SUBCOMMAND Subcommand
[ARG] ... Subcommand arguments
Subcommands:
create Create a Policy
delete, destroy Delete a Policy
hosts List all hosts
info, show Show a Policy
list, index List Policies
update Update a Policy
Options:
-h, --help Print help
2.54.1. hammer policy create リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
Create a Policy
Usage:
hammer policy create [OPTIONS]
Options:
--cron-line CRON_LINE Policy schedule cron line (only if period == “custom”)
--day-of-month DAY_OF_MONTH Policy schedule day of month (only if period == “monthly”)
--deploy-by DEPLOY_BY How the policy should be deployed
Possible value(s): 'puppet', 'ansible', 'manual'
--description DESCRIPTION Policy description
--host-ids HOST_IDS Apply policy to hosts
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hostgroup-ids HOSTGROUP_IDS Apply policy to host groups
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hostgroups HOSTGROUP_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hosts HOST_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--location LOCATION_NAME Name to search by
--location-id LOCATION_ID Set the current location context for the request
--location-ids LOCATION_IDS REPLACE locations with given ids
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--locations LOCATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--name NAME Policy name
--organization ORGANIZATION_NAME Name to search by
--organization-id ORGANIZATION_ID Set the current organization context for the request
--organization-ids ORGANIZATION_IDS REPLACE organizations with given ids.
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--period PERIOD Policy schedule period (weekly, monthly, custom)
--scap-content SCAP_CONTENT_TITLE SCAP content title
--scap-content-id SCAP_CONTENT_ID Policy SCAP content ID
--scap-content-profile SCAP_CONTENT_PROFILE_NAME Name to search by
--scap-content-profile-id SCAP_CONTENT_PROFILE_ID Policy SCAP content profile ID
--tailoring-file TAILORING_FILE_NAME Tailoring file name
--tailoring-file-id TAILORING_FILE_ID Tailoring file ID
--tailoring-file-profile-id TAILORING_FILE_PROFILE_ID Tailoring file profile ID
--weekday WEEKDAY Policy schedule weekday (only if period == “weekly”)
-h, --help Print help
Usage:
hammer policy create [OPTIONS]
Options:
--cron-line CRON_LINE Policy schedule cron line (only if period == “custom”)
--day-of-month DAY_OF_MONTH Policy schedule day of month (only if period == “monthly”)
--deploy-by DEPLOY_BY How the policy should be deployed
Possible value(s): 'puppet', 'ansible', 'manual'
--description DESCRIPTION Policy description
--host-ids HOST_IDS Apply policy to hosts
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hostgroup-ids HOSTGROUP_IDS Apply policy to host groups
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hostgroups HOSTGROUP_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--hosts HOST_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--location LOCATION_NAME Name to search by
--location-id LOCATION_ID Set the current location context for the request
--location-ids LOCATION_IDS REPLACE locations with given ids
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--locations LOCATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--name NAME Policy name
--organization ORGANIZATION_NAME Name to search by
--organization-id ORGANIZATION_ID Set the current organization context for the request
--organization-ids ORGANIZATION_IDS REPLACE organizations with given ids.
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--period PERIOD Policy schedule period (weekly, monthly, custom)
--scap-content SCAP_CONTENT_TITLE SCAP content title
--scap-content-id SCAP_CONTENT_ID Policy SCAP content ID
--scap-content-profile SCAP_CONTENT_PROFILE_NAME Name to search by
--scap-content-profile-id SCAP_CONTENT_PROFILE_ID Policy SCAP content profile ID
--tailoring-file TAILORING_FILE_NAME Tailoring file name
--tailoring-file-id TAILORING_FILE_ID Tailoring file ID
--tailoring-file-profile-id TAILORING_FILE_PROFILE_ID Tailoring file profile ID
--weekday WEEKDAY Policy schedule weekday (only if period == “weekly”)
-h, --help Print help