2.51. hammer policy

ポリシーを操作します。

Usage:
    hammer policy [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 create                        Create a Policy
 delete                        Delete a Policy
 info                          Show a Policy
 list                          List Policies
 update                        Update a Policy

Options:
 -h, --help                    Print help

2.51.1. hammer policy create

ポリシーを作成します。

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
 --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                     Organization ID
 --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
 --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-profile-id TAILORING_FILE_PROFILE_ID Tailoring file profile ID
 --weekday WEEKDAY                                     Policy schedule weekday (only if period == “weekly”)
 -h, --help                                            Print help