From fa2dd70cabe4e8109a22323384965ff944451cc2 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 16 Sep 2017 08:11:34 -0500 Subject: [PATCH 1/4] replace usage warning --- runtags | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/runtags b/runtags index 2c85103d2..70f60aa03 100755 --- a/runtags +++ b/runtags @@ -22,6 +22,15 @@ fi tags=$(echo $1 | tr "," "\n") +if [ "$tags" == "" ] +then + echo " usage: ./runtags " + echo " Can take a single value or a comma separated list" + echo " Retrieving a list of possible values" + ansible-playbook -i ansible_hosts iiab.yml --connection=local --list-tag + exit 0 +fi + found="N" for tag in $tags @@ -30,7 +39,6 @@ do then found="Y" fi - done # echo $found @@ -42,12 +50,5 @@ then taglist="prep,"$taglist fi -# script to run a specific tag in the current playbook -if [ $# -ne 1 ]; then - echo "usage: $0 " - 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" ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist""" From 825d442a3479dc071e6435fc97cdcf06c9b671db Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Thu, 21 Sep 2017 16:01:53 -0400 Subject: [PATCH 2/4] move ansible tmp file to eliminate ~ --- ansible.cfg | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index 6f05aa69a..70292fd33 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,7 +1,7 @@ # 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, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it @@ -13,8 +13,8 @@ hostfile = /etc/ansible/hosts library = /usr/share/ansible -remote_tmp = ~/.ansible/tmp -local_tmp = ~/.ansible/tmp +remote_tmp = /opt/iiab/iiab/.anisble/tmp +local_tmp = /opt/iiab/iiab/.anisble/tmp pattern = * forks = 5 poll_interval = 15 @@ -72,22 +72,22 @@ timeout = 10 # list any Jinja2 extensions to enable here: #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 #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. # 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} # 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" -# messages. NOTE: the task header will still be shown regardless of whether or not the +# 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 # task is skipped. #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 # to revert the behavior to pre-1.3. #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 # 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 # don't like colors either? # set to 1 if you don't want colors, or export ANSIBLE_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 # common locations: # RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt # Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # 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 # 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. #http_user_agent = ansible-agent @@ -147,32 +147,32 @@ filter_plugins = /usr/share/ansible_plugins/filter_plugins [ssh_connection] # 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 #ssh_args = -o ControlMaster=auto -o ControlPersist=60s # The path to use for the ControlPath sockets. This defaults to # "%(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 -# 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. -# -# Example: +# +# Example: # control_path = %(directory)s/%%h-%%r #control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r -# Enabling pipelining reduces the number of SSH operations required to -# execute a module on the remote server. This can result in a significant -# performance improvement when enabled, however when using "sudo:" you must +# Enabling pipelining reduces the number of SSH operations required to +# execute a module on the remote server. This can result in a significant +# performance improvement when enabled, however when using "sudo:" you must # first disable 'requiretty' in /etc/sudoers # # By default, this option is disabled to preserve compatibility with # sudoers configurations that have requiretty (the default on many distros). -# +# #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) #scp_if_ssh = True @@ -183,7 +183,7 @@ accelerate_connect_timeout = 5.0 # The daemon timeout is measured in minutes. This time is measured # 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 # private keys to be uploaded to it, though each user must From 7ac1395932601e8c15ef0c54451b8b8eddaa8936 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 21 Sep 2017 16:38:04 -0400 Subject: [PATCH 3/4] Clarified usage explanation (what "./runtags" shows when run w/o params) --- runtags | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtags b/runtags index 70f60aa03..f5992b8f9 100755 --- a/runtags +++ b/runtags @@ -25,8 +25,8 @@ tags=$(echo $1 | tr "," "\n") if [ "$tags" == "" ] then echo " usage: ./runtags " - echo " Can take a single value or a comma separated list" - echo " Retrieving a list of possible values" + 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 From 8afa766256a75837ff0e64dd77d1e83808f5e92b Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Thu, 21 Sep 2017 22:08:18 -0400 Subject: [PATCH 4/4] typo --- ansible.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index 70292fd33..3e0caabbd 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -13,8 +13,8 @@ hostfile = /etc/ansible/hosts library = /usr/share/ansible -remote_tmp = /opt/iiab/iiab/.anisble/tmp -local_tmp = /opt/iiab/iiab/.anisble/tmp +remote_tmp = /opt/iiab/iiab/.ansible/tmp +local_tmp = /opt/iiab/iiab/.ansible/tmp pattern = * forks = 5 poll_interval = 15