display.deprecated('Specifying --tags multiple times on the command line currently uses the last specified value. In 2.4, values will be merged instead. Set merge_multiple_cli_tags=True in ansible.cfg to get this behavior now.',version=2.5,removed=False)
display.deprecated('Specifying --tags multiple times on the command line currently uses the last specified value. '
'In 2.4, values will be merged instead. Set merge_multiple_cli_tags=True in ansible.cfg to get this behavior now.',
version=2.5,removed=False)
self.options.tags=[self.options.tags[-1]]
tags=set()
@ -460,7 +463,9 @@ class CLI(with_metaclass(ABCMeta, object)):
display.deprecated('Specifying --skip-tags multiple times on the command line currently uses the last specified value. In 2.4, values will be merged instead. Set merge_multiple_cli_tags=True in ansible.cfg to get this behavior now.',version=2.5,removed=False)
display.deprecated('Specifying --skip-tags multiple times on the command line currently uses the last specified value. '
'In 2.4, values will be merged instead. Set merge_multiple_cli_tags=True in ansible.cfg to get this behavior now.',
raiseAnsibleError("Problem running vault password script %s (%s). If this is not a script, remove the executable bit from the file."%(''.join(this_path),e))
raiseAnsibleError("Problem running vault password script %s (%s). If this is not a script, "
"remove the executable bit from the file."%(''.join(this_path),e))
stdout,stderr=p.communicate()
ifp.returncode!=0:
raiseAnsibleError("Vault password script %s returned non-zero (%s): %s"%(this_path,p.returncode,p.stderr))
self.parser.add_option('--no-wait',dest='wait',action='store_false',default=True,help='Don\'t wait for import results.')
self.parser.add_option('--branch',dest='reference',help='The name of a branch to import. Defaults to the repository\'s default branch (usually master)')
help='The name of a branch to import. Defaults to the repository\'s default branch (usually master)')
self.parser.add_option('--role-name',dest='role_name',help='The name the role should have, if different than the repo name')
self.parser.add_option('--status',dest='check_status',action='store_true',default=False,help='Check the status of the most recent import request for given github_user/github_repo.')
self.parser.add_option('-p','--init-path',dest='init_path',default="./",help='The path in which the skeleton role will be created. The default is the current working directory.')
self.parser.add_option('-i','--ignore-errors',dest='ignore_errors',action='store_true',default=False,help='Ignore errors and continue with the next specified role.')
self.parser.add_option('--remove',dest='remove_id',default=None,help='Remove the integration matching the provided ID value. Use --list to see ID values.')
help='The path to the directory containing your roles. The default is the roles_path configured in your ansible.cfg file (/etc/ansible/roles if not configured)')
BECOME_ERROR_STRINGS={'sudo':'Sorry, try again.','su':'Authentication failure','pbrun':'','pfexec':'','doas':'Permission denied','dzdo':'','ksu':'Password incorrect'}#FIXME: deal with i18n
BECOME_MISSING_STRINGS={'sudo':'sorry, a password is required to run sudo','su':'','pbrun':'','pfexec':'','doas':'Authorization required','dzdo':'','ksu':'No password given'}#FIXME: deal with i18n
BECOME_ERROR_STRINGS={
'sudo':'Sorry, try again.',
'su':'Authentication failure',
'pbrun':'',
'pfexec':'',
'doas':'Permission denied',
'dzdo':'',
'ksu':'Password incorrect'
}# FIXME: deal with i18n
BECOME_MISSING_STRINGS={
'sudo':'sorry, a password is required to run sudo',
# Connections can raise exceptions during polling (eg, network bounce, reboot); these should be non-fatal.
# On an exception, call the connection's reset method if it has one (eg, drop/recreate WinRM connection; some reused connections are in a broken state)
# On an exception, call the connection's reset method if it has one
# (eg, drop/recreate WinRM connection; some reused connections are in a broken state)
display.vvvv("Exception during async poll, retrying... (%s)"%to_text(e))
myerr.append('Attempted to execute "%s" as inventory script: %s'%(hostsfile,to_native(e)))
elifshebang_present:
myerr.append("The inventory file \'%s\' looks like it should be an executable inventory script, but is not marked executable. Perhaps you want to correct this with `chmod +x %s`?"%(hostsfile,hostsfile))
myerr.append("The inventory file \'%s\' looks like it should be an executable inventory script, but is not marked executable. "
"Perhaps you want to correct this with `chmod +x %s`?"%(hostsfile,hostsfile))
raiseAnsibleError("inventory data from {0} contained characters that cannot be interpreted as UTF-8: {1}".format(to_native(self.filename),to_native(e)))
raiseAnsibleError("inventory data from {0} contained characters that cannot be interpreted as UTF-8: {1}".format(to_native(self.filename),
to_native(e)))
# see comment about _meta below
self.host_vars_from_top=None
@ -82,7 +83,8 @@ class InventoryScript:
ifnotisinstance(self.raw,Mapping):
sys.stderr.write(to_native(err)+"\n")
raiseAnsibleError("failed to parse executable inventory script results from {0}: data needs to be formatted as a json dict".format(to_native(self.filename)))
raiseAnsibleError("failed to parse executable inventory script results from {0}: data needs to be formatted "
"as a json dict".format(to_native(self.filename)))
# This helper does not have access to fail_json so we have to print
# json output on our own.
print('\n{"msg": "Error: Module unable to locate ANSIBLE_MODULE_ARGS in json data from stdin. Unable to figure out what parameters were passed", "failed": true}')
print('\n{"msg": "Error: Module unable to locate ANSIBLE_MODULE_ARGS in json data from stdin. Unable to figure out what parameters were passed", '
self.fail_json(msg='Failed creating temp file for atomic move. This usually happens when using Python3 less than Python3.5. Please use Python2.x or Python3.5 or greater.',exception=traceback.format_exc())
self.fail_json(msg='Failed creating temp file for atomic move. This usually happens when using Python3 less than Python3.5. '
'Please use Python2.x or Python3.5 or greater.',exception=traceback.format_exc())
module.fail_json(msg='There is an issue in the code of the module. You must specify either both, resource or client to the conn_type parameter in the boto3_conn function call')
module.fail_json(msg='There is an issue in the code of the module. You must specify either both, resource or client to the conn_type '
raiseAnsibleAWSError("Region %s does not seem to be available for aws module %s. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path"%(region,aws_module.__name__))
raiseAnsibleAWSError("Region %s does not seem to be available for aws module %s. If the region definitely exists, you may need to upgrade "
"boto or extend with endpoints_path"%(region,aws_module.__name__))
else:
raiseAnsibleAWSError("Unknown problem connecting to region %s for aws module %s."%(region,aws_module.__name__))
-'A dictionary array of route tables to add of the form: C({ subnets: [172.22.2.0/24, 172.22.3.0/24,], routes: [{ dest: 0.0.0.0/0, gw: igw},], resource_tags: ... }). Where the subnets list is those subnets the route table should be associated with, and the routes list is a list of routes to be in the table. The special keyword for the gw of igw specifies that you should the route should go through the internet gateway attached to the VPC. gw also accepts instance-ids, interface-ids, and vpc-peering-connection-ids in addition igw. resource_tags is optional and uses dictionary form: C({"Name": "public", ... }). This module is currently unable to affect the "main" route table due to some limitations in boto, so you must explicitly define the associated subnets or they will be attached to the main table implicitly. As of 1.8, if the route_tables parameter is not specified, no existing routes will be modified.'
# todo: uncomment once boto has https://github.com/boto/boto/pull/3447 fixed
# index_throughput_changes = dict((name, index.throughput) for name, index in set_index_objects.items() if name not in added_indexes and (index.throughput['read'] != str(table_index_objects[name].throughput['read']) or index.throughput['write'] != str(table_index_objects[name].throughput['write'])))
# for name, index in set_index_objects.items():
# if (name not in added_indexes and
# (index.throughput['read'] != str(table_index_objects[name].throughput['read']) or
module.fail_json(msg="Error while trying to find the new image. Using wait=yes and/or a longer wait_timeout may help. %s: %s"%(e.error_code,e.error_message))
module.fail_json(msg="Error while trying to find the new image. Using wait=yes and/or a longer "
"wait_timeout may help. %s: %s"%(e.error_code,e.error_message))
-"A dictionary/hash of tags in the format { tag1_name: 'tag1_value', tag2_name: 'tag2_value' } to match against the auto scaling group(s) you are searching for."
-/bin/sh-c"while true; do echo '<html><head><title>Amazon ECS Sample App</title></head><body><div><h1>Amazon ECS Sample App</h1><h2>Congratulations!</h2><p>Your application is now running on a container in Amazon ECS.</p>' > top; /bin/date > date ; echo '</div></body></html>' > bottom; cat top date bottom > /usr/local/apache2/htdocs/index.html ; sleep 1; done"
module.fail_json(msg="You have specified a revision of %d but a created revision would be %d"%(revision,existing_definitions_in_family[-1]['revision']+1))
module.fail_json(msg="You have specified a revision of %d but a created revision would be %d"%
-Aproperlyjsonformattedpolicyasstring(mutuallyexclusivewithC(policy_document),seehttps://github.com/ansible/ansible/issues/7005#issuecomment-42894813 on how to use it properly)
-AlistofmanagedpolicyARNs(can't use friendly names due to AWS API limitation) to attach to the role. To embed an inline policy, use M(iam_policy). To remove existing policies, use an empty list item.
-AlistofmanagedpolicyARNs(can't use friendly names due to AWS API limitation) to attach to the role. To embed an inline policy,
-"Maintenance window in format of ddd:hh24:mi-ddd:hh24:mi. (Example: Mon:22:00-Mon:23:15) If not specified then a random maintenance window is assigned. Used only when command=create or command=modify."
-"Number of days backups are retained. Set to 0 to disable backups. Default is 1 day. Valid range: 0-35. Used only when command=create or command=modify."
-"AWS region to create the bucket in. If not set then the value of the AWS_REGION and EC2_REGION environment variables are checked, followed by the aws_region and ec2_region settings in the Boto config file. If none of those are set the region defaults to the S3 Location: US Standard. Prior to ansible 1.8 this parameter could be specified but had no effect."
-"Overrides initial bucket lookups in case bucket or iam policies are restrictive. Example: a user may have the GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying ignore_nonexistent_bucket: True."
-"Indicates the lifetime of the objects that are subject to the rule by the date they will expire. The value must be ISO-8601 format, the time must be midnight and a GMT timezone must be specified."
-"Indicates the lifetime of the objects that are subject to the rule by the date they will transition to a different storage class. The value must be ISO-8601 format, the time must be midnight and a GMT timezone must be specified. If transition_days is not specified, this parameter is required."
# Configure a lifecycle rule to transition all items with a prefix of /logs/ to glacier on 31 Dec 2020 and then delete on 31 Dec 2030. Note that midnight GMT must be specified.
# Configure a lifecycle rule to transition all items with a prefix of /logs/ to glacier on 31 Dec 2020 and then delete on 31 Dec 2030.
-'Dict entry from extension to MIME type. This will override any default/sniffed MIME type. For example C({".txt": "application/text", ".yml": "appication/text"})'
-"AWS region to create the bucket in. If not set then the value of the AWS_REGION and EC2_REGION environment variables are checked, followed by the aws_region and ec2_region settings in the Boto config file. If none of those are set the region defaults to the S3 Location: US Standard."
-"Suffix that is appended to a request that is for a directory on the website endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html). The suffix must not include a slash character."
-Theduration,inseconds,ofthesessiontoken.Seehttp://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html#API_GetSessionToken_RequestParameters for acceptable and default values.
description:"The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values: 12.04.5-LTS, 14.04.2-LTS, 15.04."
-OnceaserveriscreatedallparametersexceptC(state)areread-only.Youcan't change the name, flavor or any other property. This is a limitation of the cloudscale.ch API. The module will silently ignore differences between the configured parameters and the running server if a server with the correct name or UUID exists. Only state changes will be applied.
-OnceaserveriscreatedallparametersexceptC(state)areread-only.Youcan't change the name, flavor or any other property. This is a limitation
module.fail_json(msg='dopy >= 0.3.2 is required for this module. dopy requires six but six is not installed. Make sure both dopy and six are installed.')
module.fail_json(msg='dopy >= 0.3.2 is required for this module. dopy requires six but six is not installed. '
'Make sure both dopy and six are installed.')
ifnotHAS_DOPY:
module.fail_json(msg='dopy >= 0.3.2 required for this module')
-Thisoptionlet's the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private', 'public-read', 'authenticated-read'.
-Thisoptionlet's the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private',
description:Subfieldofsubscription.Notrequired.Ifspecified,messageswillberetrievedfromtopicviatheprovidedsubscriptionname.max_messages(int;defaultNone;maxnumberofmessagestopull),message_ack(bool;defaultFalse;acknowledgethemessage)andreturn_immediately(bool;defaultTrue,don't wait for messages to appear). If the messages are acknowledged, changed is set to True, otherwise, changed is False.
(bool;defaultTrue,don't wait for messages to appear). If the messages are acknowledged, changed is set to True, otherwise, changed is False.
push_endpoint:
description:Subfieldofsubscription.Notrequired.Ifspecified,messagewillbesenttoanendpoint.SeeU(https://cloud.google.com/pubsub/docs/advanced#push_endpoints) for more information.
module.fail_json(msg='pysphere does not support verifying certificates with python < 2.7.9. Either update python or set validate_certs=False on the task')
module.fail_json(msg='pysphere does not support verifying certificates with python < 2.7.9. Either update python or set '
-"You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
-"You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
-IfyouareI(deleting)domainsbyusingC(state=absent),thennotethatifyouspecifysubdomains,justthoseparticularsubdomainswillbedeleted.Ifyoudon't specify subdomains, the domain will be deleted.
-"You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
-"You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
-Sadly,youI(do)needtoknowyourwebfactionhostnamefortheC(host)parameter.Butatleast,unliketheAPI,youdon't need to know the IP address - you can use a DNS name.
-Sadly,youI(do)needtoknowyourwebfactionhostnamefortheC(host)parameter.Butatleast,unliketheAPI,youdon't need to know the IP
-"You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
module.fail_json(msg="service_name supplied but no service_port, a port is required to configure a service. Did you configure the 'port' argument meaning 'service_port'?")
module.fail_json(msg="service_name supplied but no service_port, a port is required to configure a service. Did you configure "
-"The database user roles valid values could either be one or more of the following strings: 'read', 'readWrite', 'dbAdmin', 'userAdmin', 'clusterAdmin', 'readAnyDatabase', 'readWriteAnyDatabase', 'userAdminAnyDatabase', 'dbAdminAnyDatabase'"
module.fail_json(msg="unable to connect, check login_user and login_password are correct, or alternatively check your @sysconfdir@/freetds.conf / ${HOME}/.freetds.conf")
module.fail_json(msg="unable to connect, check login_user and login_password are correct, or alternatively check your "
# If defined, mysqldump demands --defaults-extra-file be the first option
ifconfig_file:
@ -312,7 +313,8 @@ def main():
exceptException:
e=get_exception()
ifos.path.exists(config_file):
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. Exception message: %s"%(config_file,e))
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. "
"Exception message: %s"%(config_file,e))
else:
module.fail_json(msg="unable to find %s. Exception message: %s"%(config_file,e))
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. Exception message: %s"%(config_file,e))
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. "
"Exception message: %s"%(config_file,e))
else:
module.fail_json(msg="unable to find %s. Exception message: %s"%(config_file,e))
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. Exception message: %s"%(config_file,e))
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. "
"Exception message: %s"%(config_file,e))
ifnotsql_log_bin:
cursor.execute("SET SQL_LOG_BIN=0;")
Some files were not shown because too many files have changed in this diff
Show More