mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
a5d8d8ec36
2 changed files with 32 additions and 31 deletions
46
ansible.cfg
46
ansible.cfg
|
@ -1,7 +1,7 @@
|
||||||
# config file for ansible -- http://ansible.com/
|
# config file for ansible -- http://ansible.com/
|
||||||
# ==============================================
|
# ==============================================
|
||||||
|
|
||||||
# nearly all parameters can be overridden in ansible-playbook
|
# nearly all parameters can be overridden in ansible-playbook
|
||||||
# or with command line flags. ansible will read ANSIBLE_CONFIG,
|
# or with command line flags. ansible will read ANSIBLE_CONFIG,
|
||||||
# ansible.cfg in the current working directory, .ansible.cfg in
|
# ansible.cfg in the current working directory, .ansible.cfg in
|
||||||
# the home directory or /etc/ansible/ansible.cfg, whichever it
|
# the home directory or /etc/ansible/ansible.cfg, whichever it
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
hostfile = /etc/ansible/hosts
|
hostfile = /etc/ansible/hosts
|
||||||
library = /usr/share/ansible
|
library = /usr/share/ansible
|
||||||
remote_tmp = ~/.ansible/tmp
|
remote_tmp = /opt/iiab/iiab/.ansible/tmp
|
||||||
local_tmp = ~/.ansible/tmp
|
local_tmp = /opt/iiab/iiab/.ansible/tmp
|
||||||
pattern = *
|
pattern = *
|
||||||
forks = 5
|
forks = 5
|
||||||
poll_interval = 15
|
poll_interval = 15
|
||||||
|
@ -72,22 +72,22 @@ timeout = 10
|
||||||
# list any Jinja2 extensions to enable here:
|
# list any Jinja2 extensions to enable here:
|
||||||
#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
|
#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
|
||||||
|
|
||||||
# if set, always use this private key file for authentication, same as
|
# if set, always use this private key file for authentication, same as
|
||||||
# if passing --private-key to ansible or ansible-playbook
|
# if passing --private-key to ansible or ansible-playbook
|
||||||
#private_key_file = /path/to/file
|
#private_key_file = /path/to/file
|
||||||
|
|
||||||
# format of string {{ ansible_managed }} available within Jinja2
|
# format of string {{ ansible_managed }} available within Jinja2
|
||||||
# templates indicates to users editing templates files will be replaced.
|
# templates indicates to users editing templates files will be replaced.
|
||||||
# replacing {file}, {host} and {uid} and strftime codes with proper values.
|
# replacing {file}, {host} and {uid} and strftime codes with proper values.
|
||||||
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
|
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
|
||||||
|
|
||||||
# by default, ansible-playbook will display "Skipping [host]" if it determines a task
|
# by default, ansible-playbook will display "Skipping [host]" if it determines a task
|
||||||
# should not be run on a host. Set this to "False" if you don't want to see these "Skipping"
|
# should not be run on a host. Set this to "False" if you don't want to see these "Skipping"
|
||||||
# messages. NOTE: the task header will still be shown regardless of whether or not the
|
# messages. NOTE: the task header will still be shown regardless of whether or not the
|
||||||
# task is skipped.
|
# task is skipped.
|
||||||
#display_skipped_hosts = True
|
#display_skipped_hosts = True
|
||||||
|
|
||||||
# by default (as of 1.3), Ansible will raise errors when attempting to dereference
|
# by default (as of 1.3), Ansible will raise errors when attempting to dereference
|
||||||
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
|
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
|
||||||
# to revert the behavior to pre-1.3.
|
# to revert the behavior to pre-1.3.
|
||||||
#error_on_undefined_vars = False
|
#error_on_undefined_vars = False
|
||||||
|
@ -112,24 +112,24 @@ vars_plugins = /usr/share/ansible_plugins/vars_plugins
|
||||||
filter_plugins = /usr/share/ansible_plugins/filter_plugins
|
filter_plugins = /usr/share/ansible_plugins/filter_plugins
|
||||||
|
|
||||||
# don't like cows? that's unfortunate.
|
# don't like cows? that's unfortunate.
|
||||||
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
|
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
|
||||||
#nocows = 1
|
#nocows = 1
|
||||||
|
|
||||||
# don't like colors either?
|
# don't like colors either?
|
||||||
# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
|
# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
|
||||||
#nocolor = 1
|
#nocolor = 1
|
||||||
|
|
||||||
# the CA certificate path used for validating SSL certs. This path
|
# the CA certificate path used for validating SSL certs. This path
|
||||||
# should exist on the controlling node, not the target nodes
|
# should exist on the controlling node, not the target nodes
|
||||||
# common locations:
|
# common locations:
|
||||||
# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
|
# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
|
||||||
# Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
|
# Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
|
||||||
# Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt
|
# Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt
|
||||||
#ca_file_path =
|
#ca_file_path =
|
||||||
|
|
||||||
# the http user-agent string to use when fetching urls. Some web server
|
# the http user-agent string to use when fetching urls. Some web server
|
||||||
# operators block the default urllib user agent as it is frequently used
|
# operators block the default urllib user agent as it is frequently used
|
||||||
# by malicious attacks/scripts, so we set it to something unique to
|
# by malicious attacks/scripts, so we set it to something unique to
|
||||||
# avoid issues.
|
# avoid issues.
|
||||||
#http_user_agent = ansible-agent
|
#http_user_agent = ansible-agent
|
||||||
|
|
||||||
|
@ -147,32 +147,32 @@ filter_plugins = /usr/share/ansible_plugins/filter_plugins
|
||||||
[ssh_connection]
|
[ssh_connection]
|
||||||
|
|
||||||
# ssh arguments to use
|
# ssh arguments to use
|
||||||
# Leaving off ControlPersist will result in poor performance, so use
|
# Leaving off ControlPersist will result in poor performance, so use
|
||||||
# paramiko on older platforms rather than removing it
|
# paramiko on older platforms rather than removing it
|
||||||
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s
|
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s
|
||||||
|
|
||||||
# The path to use for the ControlPath sockets. This defaults to
|
# The path to use for the ControlPath sockets. This defaults to
|
||||||
# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
|
# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
|
||||||
# very long hostnames or very long path names (caused by long user names or
|
# very long hostnames or very long path names (caused by long user names or
|
||||||
# deeply nested home directories) this can exceed the character limit on
|
# deeply nested home directories) this can exceed the character limit on
|
||||||
# file socket names (108 characters for most platforms). In that case, you
|
# file socket names (108 characters for most platforms). In that case, you
|
||||||
# may wish to shorten the string below.
|
# may wish to shorten the string below.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# control_path = %(directory)s/%%h-%%r
|
# control_path = %(directory)s/%%h-%%r
|
||||||
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
|
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
|
||||||
|
|
||||||
# Enabling pipelining reduces the number of SSH operations required to
|
# Enabling pipelining reduces the number of SSH operations required to
|
||||||
# execute a module on the remote server. This can result in a significant
|
# execute a module on the remote server. This can result in a significant
|
||||||
# performance improvement when enabled, however when using "sudo:" you must
|
# performance improvement when enabled, however when using "sudo:" you must
|
||||||
# first disable 'requiretty' in /etc/sudoers
|
# first disable 'requiretty' in /etc/sudoers
|
||||||
#
|
#
|
||||||
# By default, this option is disabled to preserve compatibility with
|
# By default, this option is disabled to preserve compatibility with
|
||||||
# sudoers configurations that have requiretty (the default on many distros).
|
# sudoers configurations that have requiretty (the default on many distros).
|
||||||
#
|
#
|
||||||
#pipelining = False
|
#pipelining = False
|
||||||
|
|
||||||
# if True, make ansible use scp if the connection type is ssh
|
# if True, make ansible use scp if the connection type is ssh
|
||||||
# (default is sftp)
|
# (default is sftp)
|
||||||
#scp_if_ssh = True
|
#scp_if_ssh = True
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ accelerate_connect_timeout = 5.0
|
||||||
|
|
||||||
# The daemon timeout is measured in minutes. This time is measured
|
# The daemon timeout is measured in minutes. This time is measured
|
||||||
# from the last activity to the accelerate daemon.
|
# from the last activity to the accelerate daemon.
|
||||||
accelerate_daemon_timeout = 30
|
accelerate_daemon_timeout = 30
|
||||||
|
|
||||||
# If set to yes, accelerate_multi_key will allow multiple
|
# If set to yes, accelerate_multi_key will allow multiple
|
||||||
# private keys to be uploaded to it, though each user must
|
# private keys to be uploaded to it, though each user must
|
||||||
|
|
17
runtags
17
runtags
|
@ -22,6 +22,15 @@ fi
|
||||||
|
|
||||||
tags=$(echo $1 | tr "," "\n")
|
tags=$(echo $1 | tr "," "\n")
|
||||||
|
|
||||||
|
if [ "$tags" == "" ]
|
||||||
|
then
|
||||||
|
echo " usage: ./runtags <tagname>"
|
||||||
|
echo " Can take a single value or a comma separated list."
|
||||||
|
echo " Now retrieving a list of possible values..."
|
||||||
|
ansible-playbook -i ansible_hosts iiab.yml --connection=local --list-tag
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
found="N"
|
found="N"
|
||||||
|
|
||||||
for tag in $tags
|
for tag in $tags
|
||||||
|
@ -30,7 +39,6 @@ do
|
||||||
then
|
then
|
||||||
found="Y"
|
found="Y"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# echo $found
|
# echo $found
|
||||||
|
@ -42,12 +50,5 @@ then
|
||||||
taglist="prep,"$taglist
|
taglist="prep,"$taglist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# script to run a specific tag in the current playbook
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
echo "usage: $0 <tagname>"
|
|
||||||
echo
|
|
||||||
echo " If you would like a list of possible values, enter $0 XXX"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-debug.log"
|
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-debug.log"
|
||||||
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""
|
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue