|
|
@ -84,7 +84,7 @@ class PlayBook(object):
|
|
|
|
playbook: path to a playbook file
|
|
|
|
playbook: path to a playbook file
|
|
|
|
host_list: path to a file like /etc/ansible/hosts
|
|
|
|
host_list: path to a file like /etc/ansible/hosts
|
|
|
|
module_path: path to ansible modules, like /usr/share/ansible/
|
|
|
|
module_path: path to ansible modules, like /usr/share/ansible/
|
|
|
|
forks: desired level of paralellism
|
|
|
|
forks: desired level of parallelism
|
|
|
|
timeout: connection timeout
|
|
|
|
timeout: connection timeout
|
|
|
|
remote_user: run as this user if not specified in a particular play
|
|
|
|
remote_user: run as this user if not specified in a particular play
|
|
|
|
remote_pass: use this remote password (for all plays) vs using SSH keys
|
|
|
|
remote_pass: use this remote password (for all plays) vs using SSH keys
|
|
|
@ -93,7 +93,7 @@ class PlayBook(object):
|
|
|
|
transport: how to connect to hosts that don't specify a transport (local, paramiko, etc)
|
|
|
|
transport: how to connect to hosts that don't specify a transport (local, paramiko, etc)
|
|
|
|
callbacks output callbacks for the playbook
|
|
|
|
callbacks output callbacks for the playbook
|
|
|
|
runner_callbacks: more callbacks, this time for the runner API
|
|
|
|
runner_callbacks: more callbacks, this time for the runner API
|
|
|
|
stats: holds aggregrate data about events occuring to each host
|
|
|
|
stats: holds aggregrate data about events occurring to each host
|
|
|
|
sudo: if not specified per play, requests all plays use sudo mode
|
|
|
|
sudo: if not specified per play, requests all plays use sudo mode
|
|
|
|
inventory: can be specified instead of host_list to use a pre-existing inventory object
|
|
|
|
inventory: can be specified instead of host_list to use a pre-existing inventory object
|
|
|
|
check: don't change anything, just try to detect some potential changes
|
|
|
|
check: don't change anything, just try to detect some potential changes
|
|
|
@ -240,7 +240,7 @@ class PlayBook(object):
|
|
|
|
utils.plugins.push_basedir(basedir)
|
|
|
|
utils.plugins.push_basedir(basedir)
|
|
|
|
for play in playbook_data:
|
|
|
|
for play in playbook_data:
|
|
|
|
if type(play) != dict:
|
|
|
|
if type(play) != dict:
|
|
|
|
raise errors.AnsibleError("parse error: each play in a playbook must be a YAML dictionary (hash), recieved: %s" % play)
|
|
|
|
raise errors.AnsibleError("parse error: each play in a playbook must be a YAML dictionary (hash), received: %s" % play)
|
|
|
|
|
|
|
|
|
|
|
|
if 'include' in play:
|
|
|
|
if 'include' in play:
|
|
|
|
# a playbook (list of plays) decided to include some other list of plays
|
|
|
|
# a playbook (list of plays) decided to include some other list of plays
|
|
|
@ -594,7 +594,7 @@ class PlayBook(object):
|
|
|
|
|
|
|
|
|
|
|
|
def generate_retry_inventory(self, replay_hosts):
|
|
|
|
def generate_retry_inventory(self, replay_hosts):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
called by /usr/bin/ansible when a playbook run fails. It generates a inventory
|
|
|
|
called by /usr/bin/ansible when a playbook run fails. It generates an inventory
|
|
|
|
that allows re-running on ONLY the failed hosts. This may duplicate some
|
|
|
|
that allows re-running on ONLY the failed hosts. This may duplicate some
|
|
|
|
variable information in group_vars/host_vars but that is ok, and expected.
|
|
|
|
variable information in group_vars/host_vars but that is ok, and expected.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|