[ansible] Update ntp
by Nicolas Chauvet
commit 1a8bb8118096a3256c35b701edad59e82ef1fa4a
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 13:48:02 2018 +0100
Update ntp
roles/ntp/tasks/main.yml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/roles/ntp/tasks/main.yml b/roles/ntp/tasks/main.yml
index 809abc2..2f346d4 100644
--- a/roles/ntp/tasks/main.yml
+++ b/roles/ntp/tasks/main.yml
@@ -20,7 +20,7 @@
- base
- name: Start ntpd
- service: name=ntpd state=running enabled=true
+ service: name=ntpd state=started enabled=true
tags:
- ntp
- service
6 years, 10 months
[ansible] Use role instead of task for openvpn
by Nicolas Chauvet
commit 771069beaa170ba193007d7eb6aa3e0330c787be
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 13:47:25 2018 +0100
Use role instead of task for openvpn
playbooks/groups/buildhw.yml | 2 --
playbooks/groups/buildvm.yml | 3 +--
2 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/playbooks/groups/buildhw.yml b/playbooks/groups/buildhw.yml
index 7e16dc6..45f805a 100644
--- a/playbooks/groups/buildhw.yml
+++ b/playbooks/groups/buildhw.yml
@@ -33,8 +33,6 @@
when: not inventory_hostname.startswith('bkernel')
- import_tasks: "{{ tasks_path }}/create_swap_file.yml swap_file_path=/var/swap-file swap_file_bs=1M swap_file_count=4096"
when: inventory_hostname.endswith('scaleway.rpmfusion.net')
- - import_tasks: "{{ tasks_path }}/openvpn_client.yml"
- when: not datacenter == 'online'
- name: make sure kojid is running
service: name=kojid state=started enabled=yes
diff --git a/playbooks/groups/buildvm.yml b/playbooks/groups/buildvm.yml
index 887cb0d..67d1967 100644
--- a/playbooks/groups/buildvm.yml
+++ b/playbooks/groups/buildvm.yml
@@ -22,6 +22,7 @@
- base
- hosts
- apache
+ - { role: openvpn/client, when: datacenter != "online" }
- { role: nfs/client, mnt_dir: '/mnt/rpmfusion_koji', nfs_src_dir: "{{ koji_hub_nfs }}" }
- { role: fas_client, when: not inventory_hostname.startswith('bkernel') }
- { role: sudo, when: not inventory_hostname.startswith('bkernel') }
@@ -32,8 +33,6 @@
when: not inventory_hostname.startswith('bkernel')
- import_tasks: "{{ tasks_path }}/motd.yml"
when: not inventory_hostname.startswith('bkernel')
- - import_tasks: "{{ tasks_path }}/openvpn_client.yml"
- when: not datacenter == 'online'
- name: make sure kojid is running
service: name=kojid state=running enabled=yes
6 years, 10 months
[ansible] Update ansible role
by Nicolas Chauvet
commit f8a9f828473a82203b263174a21babf5d9e626f5
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 12:39:21 2018 +0100
Update ansible role
roles/ansible-server/tasks/main.yml | 2 +-
roles/ansible-server/templates/ansible.cfg.j2 | 328 ++++++++++++++++++++-----
2 files changed, 272 insertions(+), 58 deletions(-)
---
diff --git a/roles/ansible-server/tasks/main.yml b/roles/ansible-server/tasks/main.yml
index 519ca3f..4ade02b 100644
--- a/roles/ansible-server/tasks/main.yml
+++ b/roles/ansible-server/tasks/main.yml
@@ -3,7 +3,7 @@
# Setup ansible-server instance
#
- name: install needed packages
- yum: pkg={{ item }} state=present
+ package: name={{ item }} state=present
with_items:
- ansible
- git
diff --git a/roles/ansible-server/templates/ansible.cfg.j2 b/roles/ansible-server/templates/ansible.cfg.j2
index 7242eab..3f553e7 100644
--- a/roles/ansible-server/templates/ansible.cfg.j2
+++ b/roles/ansible-server/templates/ansible.cfg.j2
@@ -1,7 +1,7 @@
-# config file for ansible -- http://ansible.com/
-# ==============================================
+# config file for ansible -- https://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
@@ -11,22 +11,23 @@
# some basic default values...
-hostfile = {{ ansible_base }}/ansible/inventory
-library = {{ ansible_base }}/ansible/library:/usr/share/ansible
-#remote_tmp = $HOME/.ansible/tmp
-pattern = *
-forks = 125
-poll_interval = 15
+#inventory = /etc/ansible/hosts
+inventory = {{ ansible_base }}/ansible/inventory
+#library = /usr/share/my_modules/
+library = {{ ansible_base }}/ansible/library:/usr/share/ansible
+#module_utils = /usr/share/my_module_utils/
+#remote_tmp = ~/.ansible/tmp
+#local_tmp = ~/.ansible/tmp
+#forks = 5
+forks = 150
+#poll_interval = 15
#sudo_user = root
#ask_sudo_pass = True
#ask_pass = True
#transport = smart
#remote_port = 22
#module_lang = C
-
-# We don't always want to be required to specify a name to get useful info
-# https://github.com/ansible/ansible/issues/14554
-display_args_to_stdout = True
+#module_set_locale = False
# plays will gather facts by default, which contain information about
# the remote system.
@@ -34,17 +35,46 @@ display_args_to_stdout = True
# smart - gather by default, but don't regather if already gathered
# implicit - gather by default, turn off with gather_facts: False
# explicit - do not gather by default, must say gather_facts: True
-gathering = smart
+#gathering = implicit
+
+# This only affects the gathering done by a play's gather_facts directive,
+# by default gathering retrieves all facts subsets
+# all - gather all subsets
+# network - gather min and network facts
+# hardware - gather hardware facts (longest facts to retrieve)
+# virtual - gather min and virtual facts
+# facter - import facts from facter
+# ohai - import facts from ohai
+# You can combine them using comma (ex: network,virtual)
+# You can negate them using ! (ex: !hardware,!facter,!ohai)
+# A minimal set of facts is always gathered.
+#gather_subset = all
+
+# some hardware related facts are collected
+# with a maximum timeout of 10 seconds. This
+# option lets you increase or decrease that
+# timeout to something more suitable for the
+# environment.
+# gather_timeout = 10
# additional paths to search for roles in, colon separated
-roles_path = {{ ansible_base }}/ansible/roles:{{ ansible_base }}/openshift-ansible/roles
+#roles_path = /etc/ansible/roles
+roles_path = {{ ansible_base }}/ansible/roles
# uncomment this to disable SSH key host checking
#host_key_checking = False
-# change the default callback
+# change the default callback, you can only have one 'stdout' type enabled at a time.
#stdout_callback = skippy
-# enable additional callbacks
+
+
+## Ansible ships with some plugins that require whitelisting,
+## this is done to avoid running all of a type by default.
+## These setting lists those that you want enabled for your system.
+## Custom plugins should not need this unless plugin author specifies it.
+
+# enable callback plugins, they can output to stdout but cannot be 'stdout' type.
+#callback_whitelist = timer, mail
callback_whitelist = fedmsg_callback2,profile_tasks,logdetail2
# Determine whether includes in tasks and handlers are "static" by
@@ -52,7 +82,10 @@ callback_whitelist = fedmsg_callback2,profile_tasks,logdetail2
# values to True will make includes behave more like they did in the
# 1.x versions.
#task_includes_static = True
-handler_includes_static = True
+#handler_includes_static = True
+
+# Controls if a missing handler for a notification event is an error or a warning
+#error_on_missing_handler = True
# change this for alternative sudo implementations
#sudo_exe = sudo
@@ -62,7 +95,7 @@ handler_includes_static = True
#sudo_flags = -H -S -n
# SSH timeout
-timeout = 60
+#timeout = 10
# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
@@ -84,6 +117,7 @@ timeout = 60
# or are hash values merged together? The default is 'replace' but
# this can also be set to 'merge'.
#hash_behaviour = replace
+hash_behaviour = merge
# by default, variables from roles will be visible in the global variable
# scope. To prevent this, the following option can be enabled, and only
@@ -93,24 +127,39 @@ timeout = 60
# 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
+# If set, configures the path to the Vault password file as an alternative to
+# specifying --vault-password-file on the command line.
+#vault_password_file = /path/to/vault_password_file
+
# 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}
-# This short version is better used in templates as it won't flag the file as changed every run.
-#ansible_managed = Ansible managed: {file} on {host}
+#ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
+# {file}, {host}, {uid}, and the timestamp can all interfere with idempotence
+# in some situations so the default is a static string:
+#ansible_managed = Ansible managed
# 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, if a task in a playbook does not include a name: field then
+# ansible-playbook will construct a header that includes the task's action but
+# not the task's args. This is a security feature because ansible cannot know
+# if the *module* considers an argument to be no_log at the time that the
+# header is printed. If your environment doesn't have a problem securing
+# stdout from ansible-playbook (or you have manually specified no_log in your
+# playbook on all of the tasks where you have secret information) then you can
+# safely set this to True to get more informative messages.
+#display_args_to_stdout = False
+
+# 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
@@ -129,27 +178,43 @@ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid}
# (as of 1.8), Ansible can optionally warn when usage of the shell and
# command module appear to be simplified by using a default Ansible module
# instead. These warnings can be silenced by adjusting the following
-# setting or adding warn=yes or warn=no to the end of the command line
+# setting or adding warn=yes or warn=no to the end of the command line
# parameter string. This will for example suggest using the git module
# instead of shelling out to the git command.
# command_warnings = False
-# set plugin path directories here, seperate with colons
-action_plugins = {{ ansible_base }}/ansible/action_plugins:/usr/share/ansible_plugins/action_plugins
-callback_plugins = {{ ansible_base }}/ansible/callback_plugins:/usr/share/ansible_plugins/callback_plugins
-connection_plugins = {{ ansible_base }}/ansible/connection_plugins:/usr/share/ansible_plugins/connection_plugins
-lookup_plugins = {{ ansible_base }}/ansible/lookup_plugins:/usr/share/ansible_plugins/lookup_plugins
-vars_plugins = {{ ansible_base }}/ansible/vars_plugins:/usr/share/ansible_plugins/vars_plugins
-filter_plugins = {{ ansible_base }}/ansible/filter_plugins:/usr/share/ansible_plugins/filter_plugins
+
+# set plugin path directories here, separate with colons
+#action_plugins = /usr/share/ansible/plugins/action
+action_plugins = /srv/web/infra/ansible/action_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/action
+#cache_plugins = /usr/share/ansible/plugins/cache
+#callback_plugins = /usr/share/ansible/plugins/callback
+callback_plugins = /srv/web/infra/ansible/callback_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/callback
+#connection_plugins = /usr/share/ansible/plugins/connection
+connection_plugins = /srv/web/infra/ansible/connection_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/connection
+#lookup_plugins = /usr/share/ansible/plugins/lookup
+lookup_plugins = /srv/web/infra/ansible/lookup_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/lookup
+#inventory_plugins = /usr/share/ansible/plugins/inventory
+#vars_plugins = /usr/share/ansible/plugins/vars
+vars_plugins = /srv/web/infra/ansible/vars_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/vars
+#filter_plugins = /usr/share/ansible/plugins/filter
+filter_plugins = /srv/web/infra/ansible/filter_plugins:/usr/lib/python2.7/site-packages/ansible/plugins/filter
+#test_plugins = /usr/share/ansible/plugins/test
+#terminal_plugins = /usr/share/ansible/plugins/terminal
+#strategy_plugins = /usr/share/ansible/plugins/strategy
+
+# by default, ansible will use the 'linear' strategy but you may want to try
+# another one
+#strategy = free
# by default callbacks are not loaded for /bin/ansible, enable this if you
-# want, for example, a notification or logging callback to also apply to
+# want, for example, a notification or logging callback to also apply to
# /bin/ansible runs
#bin_ansible_callbacks = False
# 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
# set which cowsay stencil you'd like to use by default. When set to 'random',
@@ -183,9 +248,16 @@ filter_plugins = {{ ansible_base }}/ansible/filter_plugins:/usr/share/ansibl
# You can disable this feature by setting retry_files_enabled to False
# and you can change the location of the files by setting retry_files_save_path
+#retry_files_enabled = False
retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry
+# squash actions
+# Ansible can optimise actions that call modules with list parameters
+# when looping. Instead of calling the module once per with_ item, the
+# module is called once with all items at once. Currently this only works
+# under limited circumstances, and only with parameters named 'name'.
+#squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper
# prevents logging of task data, off by default
#no_log = False
@@ -193,10 +265,75 @@ retry_files_enabled = False
# prevents logging of tasks, but only on the targets, data is still logged on the master/controller
#no_target_syslog = False
+# controls whether Ansible will raise an error or warning if a task has no
+# choice but to create world readable temporary files to execute a module on
+# the remote machine. This option is False by default for security. Users may
+# turn this on to have behaviour more like Ansible prior to 2.1.x. See
+# https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
+# for more secure ways to fix this than enabling this option.
+#allow_world_readable_tmpfiles = False
+
# controls the compression level of variables sent to
# worker processes. At the default of 0, no compression
# is used. This value must be an integer from 0 to 9.
-#var_compression_level = 9
+#var_compression_level = 4
+
+# controls what compression method is used for new-style ansible modules when
+# they are sent to the remote system. The compression types depend on having
+# support compiled into both the controller's python and the client's python.
+# The names should match with the python Zipfile compression types:
+# * ZIP_STORED (no compression. available everywhere)
+# * ZIP_DEFLATED (uses zlib, the default)
+# These values may be set per host via the ansible_module_compression inventory
+# variable
+#module_compression = 'ZIP_DEFLATED'
+
+# This controls the cutoff point (in bytes) on --diff for files
+# set to 0 for unlimited (RAM may suffer!).
+#max_diff_size = 1048576
+
+# This controls how ansible handles multiple --tags and --skip-tags arguments
+# on the CLI. If this is True then multiple arguments are merged together. If
+# it is False, then the last specified argument is used and the others are ignored.
+# This option will be removed in 2.8.
+#merge_multiple_cli_flags = True
+
+# Controls showing custom stats at the end, off by default
+#show_custom_stats = True
+
+# Controls which files to ignore when using a directory as inventory with
+# possibly multiple sources (both static and dynamic)
+#inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo
+
+# This family of modules use an alternative execution path optimized for network appliances
+# only update this setting if you know how this works, otherwise it can break module execution
+#network_group_modules=['eos', 'nxos', 'ios', 'iosxr', 'junos', 'vyos']
+
+# This keeps facts from polluting the main namespace as variables.
+# Setting to True keeps them under the ansible_facts namespace, the default is False
+#restrict_facts_namespace: True
+
+# When enabled, this option allows lookups (via variables like lookup('foo') or when used as
+# a loop with `with_foo`) to return data that is not marked "unsafe". This means the data may contain
+# jinja2 templating language which will be run through the templating engine.
+# ENABLING THIS COULD BE A SECURITY RISK
+#allow_unsafe_lookups = False
+
+# set default errors for all plays
+#any_errors_fatal = False
+
+[inventory]
+# enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini'
+#enable_plugins = host_list, virtualbox, yaml, constructed
+
+# ignore these extensions when parsing a directory as inventory source
+#ignore_extensions = '.pyc', '.pyo', '.swp', '.bak', '~', '.rpm', '.md', '.txt', '~', '.orig', '.ini', '.cfg', '.retry'
+
+# ignore files matching these patterns when parsing a directory as inventory source
+#ignore_patterns=
+
+# If 'true' unparsed inventory sources become fatal errors, they are warnings otherwise.
+#unparsed_is_failed=False
[privilege_escalation]
#become=True
@@ -215,43 +352,94 @@ retry_files_enabled = False
# line to disable this behaviour.
#pty=False
+# paramiko will default to looking for SSH keys initially when trying to
+# authenticate to remote devices. This is a problem for some network devices
+# that close the connection after a key failure. Uncomment this line to
+# disable the Paramiko look for keys function
+#look_for_keys = False
+
+# When using persistent connections with Paramiko, the connection runs in a
+# background process. If the host doesn't already have a valid SSH key, by
+# default Ansible will prompt to add the host key. This will cause connections
+# running in background processes to fail. Uncomment this line to have
+# Paramiko automatically add host keys.
+#host_key_auto_add = True
+
[ssh_connection]
# ssh arguments to 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
-# deeply nested home directories) this can exceed the character limit on
-# file socket names (108 characters for most platforms). In that case, you
-# may wish to shorten the string below.
+# Leaving off ControlPersist will result in poor performance, so use
+# paramiko on older platforms rather than removing it, -C controls compression use
+#ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
+ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
+
+# The base directory for the ControlPath sockets.
+# This is the "%(directory)s" in the control_path option
#
# Example:
+# control_path_dir = /tmp/.ansible/cp
+#control_path_dir = ~/.ansible/cp
+
+# The path to use for the ControlPath sockets. This defaults to a hashed string of the hostname,
+# port and username (empty string in the config). The hash mitigates a common problem users
+# found with long hostames and the conventional %(directory)s/ansible-ssh-%%h-%%p-%%r format.
+# In those cases, a "too long for Unix domain socket" ssh error would occur.
+#
+# Example:
# control_path = %(directory)s/%%h-%%r
-#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
+#control_path =
-# 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
pipelining = True
-# if True, make ansible use scp if the connection type is ssh
-# (default is sftp)
-#scp_if_ssh = True
+# Control the mechanism for transferring files (old)
+# * smart = try sftp and then try scp [default]
+# * True = use scp only
+# * False = use sftp only
+#scp_if_ssh = smart
+
+# Control the mechanism for transferring files (new)
+# If set, this will override the scp_if_ssh option
+# * sftp = use sftp to transfer files
+# * scp = use scp to transfer files
+# * piped = use 'dd' over SSH to transfer files
+# * smart = try sftp, scp, and piped, in that order [default]
+#transfer_method = smart
# if False, sftp will not use batch mode to transfer files. This may cause some
# types of file transfer failures impossible to catch however, and should
# only be disabled if your sftp version has problems with batch mode
#sftp_batch_mode = False
+[persistent_connection]
+
+# Configures the persistent connection timeout value in seconds. This value is
+# how long the persistent connection will remain idle before it is destroyed.
+# If the connection doesn't receive a request before the timeout value
+# expires, the connection is shutdown. The default value is 30 seconds.
+#connect_timeout = 30
+
+# Configures the persistent connection retry timeout. This value configures the
+# the retry timeout that ansible-connection will wait to connect
+# to the local domain socket. This value must be larger than the
+# ssh timeout (timeout) and less than persistent connection idle timeout (connect_timeout).
+# The default value is 15 seconds.
+#connect_retry_timeout = 15
+
+# The command timeout value defines the amount of time to wait for a command
+# or RPC call before timing out. The value for the command timeout must
+# be less than the value of the persistent connection idle timeout (connect_timeout)
+# The default value is 10 second.
+#command_timeout = 10
+
[accelerate]
#accelerate_port = 5099
#accelerate_timeout = 30
@@ -259,7 +447,7 @@ pipelining = True
# 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
@@ -271,4 +459,30 @@ pipelining = True
# file systems that require special treatment when dealing with security context
# the default behaviour that copies the existing context or uses the user default
# needs to be changed to use the file system dependent context.
-#special_context_filesystems=nfs,vboxsf,fuse,ramfs
+#special_context_filesystems=nfs,vboxsf,fuse,ramfs,9p
+
+# Set this to yes to allow libvirt_lxc connections to work without SELinux.
+#libvirt_lxc_noseclabel = yes
+
+[colors]
+#highlight = white
+#verbose = blue
+#warn = bright purple
+#error = red
+#debug = dark gray
+#deprecate = purple
+#skip = cyan
+#unreachable = red
+#ok = green
+#changed = yellow
+#diff_add = green
+#diff_remove = red
+#diff_lines = cyan
+
+
+[diff]
+# Always print diff when running ( same as always running with -D/--diff )
+# always = no
+
+# Set how many context lines to show in diff
+# context = 3
6 years, 10 months
[ansible] sync scripts
by Nicolas Chauvet
commit 7c144111028bec16c4a8b58495b107884f7d6495
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 12:20:11 2018 +0100
sync scripts
scripts/freezelist | 20 +++++++-------------
scripts/hosts_with_var_set | 22 +++++++---------------
scripts/list-vms-per-host | 12 ++++++++++--
scripts/vhost-info | 37 +++++++++++++++++--------------------
scripts/which_playbook | 15 +++++++--------
5 files changed, 48 insertions(+), 58 deletions(-)
---
diff --git a/scripts/freezelist b/scripts/freezelist
index bc381a4..2690a54 100755
--- a/scripts/freezelist
+++ b/scripts/freezelist
@@ -9,30 +9,24 @@ import sys
from optparse import OptionParser
from ansible.parsing.dataloader import DataLoader
-from ansible.vars import VariableManager
-from ansible.inventory import Inventory
+from ansible.vars.manager import VariableManager
+from ansible.inventory.manager import InventoryManager
+from ansible import constants as C
parser = OptionParser(version="1.0")
-parser.add_option('-i', dest='inventory', default=None,
+parser.add_option('-i', dest='inventory', default=C.DEFAULT_HOST_LIST,
help="Path to inventory file/dir")
opts, args = parser.parse_args(sys.argv[1:])
-variable_manager = VariableManager()
loader = DataLoader()
-
-
-if opts.inventory:
- inv = Inventory(loader=loader,variable_manager=variable_manager, host_list=opts.inventory)
-else:
- inv = Inventory(loader=loader,variable_manager=variable_manager)
-
-variable_manager.set_inventory(inv)
+inv = InventoryManager(loader=loader, sources=opts.inventory)
+variable_manager = VariableManager(loader=loader, inventory=inv)
frozen = []
unfrozen = []
for host in sorted(inv.get_hosts()):
- vars = variable_manager.get_vars(loader=loader, host=host)
+ vars = variable_manager.get_vars(host=host)
freezes = vars.get('freezes', None)
if freezes:
diff --git a/scripts/hosts_with_var_set b/scripts/hosts_with_var_set
index 19a2858..ec35858 100755
--- a/scripts/hosts_with_var_set
+++ b/scripts/hosts_with_var_set
@@ -5,15 +5,16 @@
# list all hosts with their corresponding vars
# Note that the script will attempt to "match" the supplied value of the var against the values if it the var is multivalued
+from ansible import constants as C
from ansible.parsing.dataloader import DataLoader
-from ansible.vars import VariableManager
-from ansible.inventory import Inventory
+from ansible.vars.manager import VariableManager
+from ansible.inventory.manager import InventoryManager
import sys
from optparse import OptionParser
parser = OptionParser(version="1.0")
-parser.add_option('-i', dest='inventory', default=None,
+parser.add_option('-i', dest='inventory', default=C.DEFAULT_HOST_LIST,
help="Path to inventory file/dir")
parser.add_option('-o', dest='variable', default=None,
help="variable name to check")
@@ -25,20 +26,11 @@ if ((opts.variable == None and opts.all_vars == None) or (opts.variable != None
print "Usage: hosts_with_var_set -o varname[=value] | -a"
sys.exit(-1)
-variable_manager = VariableManager()
loader = DataLoader()
-
-if opts.inventory:
- inv = Inventory(loader=loader,variable_manager=variable_manager, host_list=opts.inventory)
-else:
- inv = Inventory(loader=loader,variable_manager=variable_manager)
-
-variable_manager.set_inventory(inv)
-
-
+inv = InventoryManager(loader=loader, sources=opts.inventory)
+variable_manager = VariableManager(loader=loader, inventory=inv)
matching=True
-
if opts.variable != None:
if opts.variable.find("=") == -1:
matching=False
@@ -51,7 +43,7 @@ if opts.variable != None:
var_set = []
for host in sorted(inv.get_hosts()):
- vars = variable_manager.get_vars(loader=loader, host=host)
+ vars = variable_manager.get_vars(host=host)
if opts.variable == None:
# remove expanded 'all' groups
vars.pop('groups')
diff --git a/scripts/list-vms-per-host b/scripts/list-vms-per-host
index a689a2b..def0d9b 100755
--- a/scripts/list-vms-per-host
+++ b/scripts/list-vms-per-host
@@ -1,6 +1,6 @@
#!/usr/bin/python -tt
# Author: Toshio Kuratomi <toshio(a)fedoraproject.org>
-# Copyright: December, 2015
+# Copyright: December 2015, November 2016
# License: LGPLv3+
import sys
import copy
@@ -14,6 +14,9 @@ from ansible.cli.adhoc import AdHocCLI
class ResultAccumulator(CallbackBase):
+ CALLBACK_VERSION = 2.0
+ CALLBACK_NAME = 'accumulator'
+
def __init__(self, *args, **kwargs):
super(ResultAccumulator, self).__init__(*args, **kwargs)
self.unreachable = set()
@@ -23,7 +26,12 @@ class ResultAccumulator(CallbackBase):
self.unreachable.add(result._host.get_name())
def v2_runner_on_ok(self, result, *args, **kwargs):
- for vm in (vm for vm in result._result.keys() if vm not in ('invocation', 'changed', '_ansible_no_log')):
+ for vm in result._result.keys():
+ if not '.fedoraproject.org' in vm:
+ # Seemingly, Ansible keeps adding more random keys to the
+ # result dict every time, so let's just kill the tailing
+ # once and for all. If it doesn't look like a hostname, ignore.
+ continue
self.host_status[(result._host.get_name(), vm)] = (result._result[vm]['state'], str(result._result[vm]['autostart']))
diff --git a/scripts/vhost-info b/scripts/vhost-info
index 3a32d34..740aad5 100755
--- a/scripts/vhost-info
+++ b/scripts/vhost-info
@@ -8,8 +8,9 @@
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
-from ansible.vars import VariableManager
-from ansible.inventory import Inventory
+from ansible.vars.manager import VariableManager
+from ansible.inventory.manager import InventoryManager
+from ansible import constants as C
from ansible.playbook.play import Play
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.plugins.callback import CallbackBase
@@ -50,7 +51,7 @@ class OutputCallback(CallbackBase):
parser = OptionParser(version = "1.0")
parser.add_option('--host', default=[], action='append', help="hosts to act on, defaults to virtservers")
-parser.add_option('--hosts-from-file', default=None, dest="host_file", help="read list of hosts from this file")
+parser.add_option('--hosts-from-file', default=C.DEFAULT_HOST_LIST, dest="host_file", help="read list of hosts from this file")
(opts, args) = parser.parse_args(sys.argv[1:])
if not opts.host:
@@ -60,23 +61,17 @@ else:
-Options = namedtuple('Options', ['connection','module_path', 'forks', 'remote_user', 'private_key_file', 'ssh_common_args', 'ssh_extra_args', 'sftp_extra_args', 'scp_extra_args', 'become', 'become_method', 'become_user', 'verbosity', 'check', 'timeout'])
+Options = namedtuple('Options', ['connection','module_path', 'forks', 'remote_user', 'private_key_file', 'ssh_common_args', 'ssh_extra_args', 'sftp_extra_args', 'scp_extra_args', 'become', 'become_method', 'become_user', 'verbosity', 'check', 'timeout', 'diff'])
-# initialize needed objects
-variable_manager = VariableManager()
-loader = DataLoader()
-
-options = Options(connection='ssh', module_path=None, forks=25, remote_user=None, private_key_file=None, ssh_common_args=None, ssh_extra_args=None, sftp_extra_args=None, scp_extra_args=None, become=None, become_method=None, become_user=None, verbosity=None, check=False, timeout=10)
+options = Options(connection='ssh', module_path=None, forks=25, remote_user=None, private_key_file=None, ssh_common_args=None, ssh_extra_args=None, sftp_extra_args=None, scp_extra_args=None, become=None, become_method=None, become_user=None, verbosity=None, check=False, timeout=10, diff=False)
# create inventory and pass to var manager
-if opts.host_file:
- inventory = Inventory(loader=loader, variable_manager=variable_manager, host_list=opts.host_file)
-else:
- inventory = Inventory(loader=loader, variable_manager=variable_manager)
-
-variable_manager.set_inventory(inventory)
+loader = DataLoader()
+inv = InventoryManager(loader=loader, sources=opts.host_file)
+variable_manager = VariableManager(loader=loader, inventory=inv)
+unpatched_spectre = loader.load_from_file('/srv/private/ansible/vars.yml')['non_spectre_patched']
# create play with tasks
play_source = dict(
@@ -87,12 +82,11 @@ play_source = dict(
)
play = Play().load(play_source, variable_manager=variable_manager, loader=loader)
-
cb=OutputCallback()
tqm = None
try:
tqm = TaskQueueManager(
- inventory=inventory,
+ inventory=inv,
variable_manager=variable_manager,
loader=loader,
options=options,
@@ -103,9 +97,12 @@ try:
finally:
if tqm is not None:
tqm.cleanup()
+
for vhostname in sorted(cb.mem_per_host):
freemem = cb.mem_per_host[vhostname] - cb.mem_used_in_vm[vhostname]
freecpu = cb.cpu_per_host[vhostname] - cb.cpu_used_in_vm[vhostname]
- print '%s:\t%s/%s mem(unused/total)\t%s/%s cpus(unused/total)' % (
- vhostname, freemem, cb.mem_per_host[vhostname], freecpu, cb.cpu_per_host[vhostname])
-
+ insecure = ''
+ if vhostname in unpatched_spectre:
+ insecure = ' (NOT PATCHED FOR SPECTRE)'
+ print '%s:\t%s/%s mem(unused/total)\t%s/%s cpus(unused/total) %s' % (
+ vhostname, freemem, cb.mem_per_host[vhostname], freecpu, cb.cpu_per_host[vhostname], insecure)
diff --git a/scripts/which_playbook b/scripts/which_playbook
index 4665837..6091e0b 100755
--- a/scripts/which_playbook
+++ b/scripts/which_playbook
@@ -26,7 +26,9 @@
import os
import sys
-import ansible.inventory
+from ansible.parsing.dataloader import DataLoader
+from ansible.inventory.manager import InventoryManager
+from ansible import constants as C
from optparse import OptionParser
host_path = '/srv/web/infra/ansible/playbooks/hosts'
@@ -57,15 +59,12 @@ def main():
parser = OptionParser(version = "1.0")
- parser.add_option('-i', dest='inventory', default=None,
+ parser.add_option('-i', dest='inventory', default=C.DEFAULT_HOST_LIST,
help="Path to inventory file/dir")
opts,hosts = parser.parse_args(sys.argv[1:])
- if opts.inventory:
- inv = ansible.inventory.Inventory(host_list=opts.inventory)
- else:
- inv = ansible.inventory.Inventory()
-
+ loader = DataLoader()
+ inv = InventoryManager(loader=loader, sources=opts.inventory)
for host in hosts:
matched_host = None
@@ -75,7 +74,7 @@ def main():
break
if host == os.path.basename(h_pb).replace(pb_extension, ''):
matched_host = h_pb
- for group in inv.groups_for_host(host):
+ for group in inv.hosts[host].groups:
if matched_group:
break
for g_pb in group_playbooks:
6 years, 10 months
[ansible] Update tasks
by Nicolas Chauvet
commit 5cefaad9f176523b96cd626b6b191948b4f16840
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 12:18:19 2018 +0100
Update tasks
tasks/2fa_client.yml | 2 +-
tasks/cloud_setup_basic.yml | 9 +++-
tasks/happy_birthday.yml | 9 ++++
tasks/postfix_basic.yml | 14 +++---
tasks/reg-server.yml | 36 ++++++++++++++++
tasks/virt_instance_create.yml | 91 ++++++++++++++++++++++++++++++++++++----
6 files changed, 141 insertions(+), 20 deletions(-)
---
diff --git a/tasks/2fa_client.yml b/tasks/2fa_client.yml
index 2e86a85..70e1980 100644
--- a/tasks/2fa_client.yml
+++ b/tasks/2fa_client.yml
@@ -1,6 +1,6 @@
---
- name: install pam_url
- yum: name=pam_url state=present
+ package: name=pam_url state=present
tags:
- packages
when: ansible_distribution_major_version|int < 22
diff --git a/tasks/cloud_setup_basic.yml b/tasks/cloud_setup_basic.yml
index 6fddfd3..1ff61d5 100644
--- a/tasks/cloud_setup_basic.yml
+++ b/tasks/cloud_setup_basic.yml
@@ -1,6 +1,6 @@
---
- name: Install desired extra packages (yum)
- yum: state=present pkg={{ item }}
+ package: state=present pkg={{ item }}
with_items:
- ntpdate
- ntp
@@ -22,7 +22,7 @@
- packages
- name: remove some packages (yum)
- yum: state=absent pkg={{ item }}
+ package: state=absent pkg={{ item }}
with_items:
- chrony
tags:
@@ -37,6 +37,9 @@
- packages
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
+- name: Include basessh
+ include_role: name=basessh
+
- name: put step-tickers in place
copy: src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
when: ansible_cmdline.ostree is not defined
@@ -45,7 +48,7 @@
- config
- name: enable the service
- service: name=ntpd state=running enabled=true
+ service: name=ntpd state=started enabled=true
when: ansible_cmdline.ostree is not defined
#- name: edit hostname to be instance name - prefix hostbase var if it exists
diff --git a/tasks/happy_birthday.yml b/tasks/happy_birthday.yml
new file mode 100644
index 0000000..95d78b1
--- /dev/null
+++ b/tasks/happy_birthday.yml
@@ -0,0 +1,9 @@
+- name: gather ssh host key from new instance
+ local_action: command ssh-keyscan -t rsa {{ inventory_hostname }}
+ ignore_errors: True
+ register: hostkey
+ when: birthday is defined
+
+- name: Include basessh
+ include_role: name=basessh
+ when: birthday is defined
diff --git a/tasks/postfix_basic.yml b/tasks/postfix_basic.yml
index f4fd76b..2688861 100644
--- a/tasks/postfix_basic.yml
+++ b/tasks/postfix_basic.yml
@@ -1,5 +1,5 @@
- name: install postfix
- yum: pkg=postfix state=present
+ package: name=postfix state=present
tags:
- postfix
- packages
@@ -8,11 +8,11 @@
copy: src={{ item }} dest=/etc/postfix/main.cf
with_first_found:
- "{{ postfix_maincf }}"
- - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"
- - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ inventory_hostname }}"
- - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ host_group }}"
- - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ postfix_group }}"
- - "{{ roles }}/base/files/postfix/main.cf/main.cf"
+ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"
+ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ inventory_hostname }}"
+ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ host_group }}"
+ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ postfix_group }}"
+ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf"
notify:
- restart postfix
tags:
@@ -20,6 +20,6 @@
- config
- name: enable postfix to start
- service: name=postfix state=running enabled=true
+ service: name=postfix state=started enabled=true
tags:
- service
diff --git a/tasks/reg-server.yml b/tasks/reg-server.yml
new file mode 100644
index 0000000..1173bff
--- /dev/null
+++ b/tasks/reg-server.yml
@@ -0,0 +1,36 @@
+- name: install reg-server
+ package:
+ name: reg-server
+ state: latest
+ tags:
+ - regserver
+
+- name: Copy reg-server repositories html template
+ copy:
+ src: "{{files}}/reg-server/repositories.html"
+ dest: "/var/lib/reg-server/templates/repositories.html"
+ tags:
+ - regserver
+
+- name: Copy reg-server tags html template
+ copy:
+ src: "{{files}}/reg-server/tags.html"
+ dest: "/var/lib/reg-server/templates/tags.html"
+ tags:
+ - regserver
+
+- name: Install cronjob file
+ copy:
+ src: "{{files}}/reg-server/cron-prod"
+ dest: "/etc/cron.d/reg-server"
+ when: env == "production"
+ tags:
+ - regserver
+
+- name: Install cronjob file - stg
+ copy:
+ src: "{{files}}/reg-server/cron-stg"
+ dest: "/etc/cron.d/reg-server"
+ when: env == "staging"
+ tags:
+ - regserver
diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml
index 290d396..695e098 100644
--- a/tasks/virt_instance_create.yml
+++ b/tasks/virt_instance_create.yml
@@ -18,7 +18,7 @@
delegate_to: "{{ vmhost }}"
when: inventory_hostname not in result.list_vms
-- name: wait for the install to finish
+- name: wait for the install to finish -> {{ inventory_hostname }}
virt: command=status name={{ inventory_hostname }}
register: vmstatus
until: vmstatus.status == 'shutdown'
@@ -27,24 +27,80 @@
delay: 10
when: inventory_hostname not in result.list_vms
-- name: start the vm up
- virt: state=running name={{ inventory_hostname }}
+- name: ARMv7 copy the kernel out
+ shell: "virt-builder --get-kernel {{ volgroup }}/{{ inventory_hostname }} --output /var/lib/libvirt/images/ | awk -F/ '{print $NF}' > /var/lib/libvirt/images/{{ inventory_hostname }}-details.txt"
+ delegate_to: "{{ vmhost}}"
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
+
+- name: ARMv7 extract the kernel details
+ command: "head -n1 /var/lib/libvirt/images/{{ inventory_hostname }}-details.txt"
+ delegate_to: "{{ vmhost}}"
+ register: host_armv7kernel
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
+
+- name: ARMv7 extract the initrd details
+ command: "tail -n1 /var/lib/libvirt/images/{{ inventory_hostname }}-details.txt"
+ delegate_to: "{{ vmhost}}"
+ register: host_armv7initrd
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
+
+- name: ARMv7 copy the cmdline out
+ shell: "virt-cat -a {{ volgroup }}/{{ inventory_hostname }} /boot/extlinux/extlinux.conf | grep -m1 append | sed -e 's/append //'"
+ delegate_to: "{{ vmhost}}"
+ register: host_cmdline
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
+
+- name: ARMv7 update the virt parameters
+ virt_boot: domain={{ inventory_hostname }} kernel=/var/lib/libvirt/images/{{ host_armv7kernel.stdout }} initrd=/var/lib/libvirt/images/{{ host_armv7initrd.stdout }} cmdline={{ host_cmdline.stdout }}
delegate_to: "{{ vmhost }}"
- when: inventory_hostname not in result.list_vms
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
-- name: set it to autostart
- virt: command=autostart name={{ inventory_hostname }}
+- name: start the vm up and set it to autostart
+ virt: state=running name={{ inventory_hostname }} autostart=True
delegate_to: "{{ vmhost }}"
when: inventory_hostname not in result.list_vms
+- name: ARMv7 pause while VM updates
+ pause: seconds=5
+ when: inventory_hostname.startswith('buildvm-armv7') and ( inventory_hostname not in result.list_vms or armv7kernelupdate is defined )
+ tags:
+ - armv7-kernel
+
- name: make sure there is no old ssh host key for the host still around
local_action: known_hosts path={{item}} host={{ inventory_hostname }} state=absent
ignore_errors: True
with_items:
- /root/.ssh/known_hosts
- - /etc/ssh/ssh_known_hosts
when: inventory_hostname not in result.list_vms
+- name: (osbs-control01.stg) make sure there is no old ssh host key for the host still around
+ known_hosts: path={{item}} host={{ inventory_hostname }} state=absent
+ ignore_errors: True
+ with_items:
+ - /root/.ssh/known_hosts
+ - /etc/ssh/ssh_known_hosts
+ when: inventory_hostname not in result.list_vms and inventory_hostname in groups['osbs-masters-stg']+groups['osbs-nodes-stg']
+ delegate_to: osbs-control01.stg.phx2.fedoraproject.org
+
+- name: (osbs-control01) make sure there is no old ssh host key for the host still around
+ known_hosts: path={{item}} host={{ inventory_hostname }} state=absent
+ ignore_errors: True
+ with_items:
+ - /root/.ssh/known_hosts
+ - /etc/ssh/ssh_known_hosts
+ when: inventory_hostname not in result.list_vms and inventory_hostname in groups['osbs-masters']+groups['osbs-nodes']
+ delegate_to: osbs-control01.phx2.fedoraproject.org
+
- name: wait for ssh on the vm to start back
local_action: wait_for delay=10 host={{ inventory_hostname }} port=22 state=started timeout=1200
when: inventory_hostname not in result.list_vms
@@ -55,11 +111,28 @@
register: hostkey
when: inventory_hostname not in result.list_vms
-- name: add new ssh host key (you still need to add it to official ssh_host_keys later)
+- name: add new ssh host key (until we can sign it)
local_action: known_hosts path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
ignore_errors: True
with_items:
- /root/.ssh/known_hosts
- - /etc/ssh/ssh_known_hosts
when: inventory_hostname not in result.list_vms
+- name: (osbs-control01.stg) add new ssh host key
+ known_hosts: path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
+ ignore_errors: True
+ with_items:
+ - /root/.ssh/known_hosts
+ - /etc/ssh/ssh_known_hosts
+ when: inventory_hostname not in result.list_vms and inventory_hostname in groups['osbs-masters-stg']+groups['osbs-nodes-stg']
+ delegate_to: osbs-control01.stg.phx2.fedoraproject.org
+
+- name: (osbs-control01) add new ssh host key
+ known_hosts: path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
+ ignore_errors: True
+ with_items:
+ - /root/.ssh/known_hosts
+ - /etc/ssh/ssh_known_hosts
+ when: inventory_hostname not in result.list_vms and inventory_hostname in groups['osbs-masters']+groups['osbs-nodes']
+ delegate_to: osbs-control01.phx2.fedoraproject.org
+
6 years, 10 months
[ansible] Add master.yml
by Nicolas Chauvet
commit 812d6e8fe49401b1007f44e5d7f79671b996219f
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 12:11:50 2018 +0100
Add master.yml
master.yml | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/master.yml b/master.yml
index 23d3437..5aa1d97 100644
--- a/master.yml
+++ b/master.yml
@@ -1,21 +1,21 @@
---
-- include : /srv/web/infra/ansible/playbooks/groups/autosign.yml
-- include : /srv/web/infra/ansible/playbooks/groups/bastion.yml
-- include : /srv/web/infra/ansible/playbooks/groups/bodhi2.yml
-- include : /srv/web/infra/ansible/playbooks/groups/buildvm.yml
-- include : /srv/web/infra/ansible/playbooks/groups/dns.yml
-- include : /srv/web/infra/ansible/playbooks/groups/fas.yml
-- include : /srv/web/infra/ansible/playbooks/groups/ipsilon.yml
-- include : /srv/web/infra/ansible/playbooks/groups/koji-hub.yml
-- include : /srv/web/infra/ansible/playbooks/groups/kojipkgs.yml
-- include : /srv/web/infra/ansible/playbooks/groups/logserver.yml
-- include : /srv/web/infra/ansible/playbooks/groups/memcached.yml
-- include : /srv/web/infra/ansible/playbooks/groups/packages.yml
-- include : /srv/web/infra/ansible/playbooks/groups/pkgdb.yml
-- include : /srv/web/infra/ansible/playbooks/groups/pkgs.yml
-- include : /srv/web/infra/ansible/playbooks/groups/postgresql-server.yml
-- include : /srv/web/infra/ansible/playbooks/groups/proxies.yml
-- include : /srv/web/infra/ansible/playbooks/groups/sign-bridge.yml
-- include : /srv/web/infra/ansible/playbooks/groups/virthost.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/autosign.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/bastion.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/bodhi2.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/buildvm.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/dns.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/fas.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/ipsilon.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/koji-hub.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/kojipkgs.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/logserver.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/memcached.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/packages.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/pkgdb.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/pkgs.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/postgresql-server.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/proxies.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/sign-bridge.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/groups/virthost.yml
6 years, 10 months
[ansible] Fix import_playbook
by Nicolas Chauvet
commit 60c1aee6690b0124e495b46250904c201b1f4a37
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 12:07:36 2018 +0100
Fix import_playbook
playbooks/check-host.yml | 2 +-
playbooks/groups/autosign.yml | 2 +-
playbooks/groups/bastion.yml | 2 +-
playbooks/groups/batcave.yml | 2 +-
playbooks/groups/bodhi-backend.yml | 2 +-
playbooks/groups/bodhi2.yml | 2 +-
playbooks/groups/bugzilla.yml | 2 +-
playbooks/groups/buildvm.yml | 2 +-
playbooks/groups/darkserver-backend.yml | 2 +-
playbooks/groups/darkserver-web.yml | 2 +-
playbooks/groups/dhcp.yml | 2 +-
playbooks/groups/dns.yml | 2 +-
playbooks/groups/fas.yml | 2 +-
playbooks/groups/github2fedmsg.yml | 2 +-
playbooks/groups/ipsilon.yml | 2 +-
playbooks/groups/koji-hub.yml | 2 +-
playbooks/groups/kojipkgs.yml | 2 +-
playbooks/groups/logserver.yml | 2 +-
playbooks/groups/mailman.yml | 2 +-
playbooks/groups/mariadb-server.yml | 2 +-
playbooks/groups/memcached.yml | 2 +-
playbooks/groups/mirrorlist2.yml | 2 +-
playbooks/groups/mirrormanager.yml | 2 +-
playbooks/groups/moin.yml | 2 +-
playbooks/groups/noc.yml | 2 +-
playbooks/groups/notifs-backend.yml | 2 +-
playbooks/groups/notifs-web.yml | 2 +-
playbooks/groups/osbs-master.yml | 4 ++--
playbooks/groups/packages.yml | 2 +-
playbooks/groups/pkgdb.yml | 2 +-
playbooks/groups/pkgs.yml | 14 +++++++-------
playbooks/groups/postgresql-server.yml | 2 +-
playbooks/groups/proxies.yml | 18 +++++++++---------
playbooks/groups/sign-bridge.yml | 2 +-
playbooks/groups/smtp-mm.yml | 2 +-
playbooks/vhost_reboot.yml | 4 ++--
playbooks/vhost_update.yml | 2 +-
37 files changed, 53 insertions(+), 53 deletions(-)
---
diff --git a/playbooks/check-host.yml b/playbooks/check-host.yml
index 52e30d9..7daace9 100644
--- a/playbooks/check-host.yml
+++ b/playbooks/check-host.yml
@@ -266,4 +266,4 @@
# handlers:
# - import_tasks: "{{ handlers_path }}/restart_services.yml"
-# - include: "restart_services.yml"
+# - import_playbook: "restart_services.yml"
diff --git a/playbooks/groups/autosign.yml b/playbooks/groups/autosign.yml
index 369ab22..74e1129 100644
--- a/playbooks/groups/autosign.yml
+++ b/playbooks/groups/autosign.yml
@@ -2,7 +2,7 @@
#
# This server looks for rawhide builds and requests they be signed.
#
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=autosign"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=autosign"
- name: make the box be real
hosts: autosign:autosign-hardware
diff --git a/playbooks/groups/bastion.yml b/playbooks/groups/bastion.yml
index d8990bf..c7316e7 100644
--- a/playbooks/groups/bastion.yml
+++ b/playbooks/groups/bastion.yml
@@ -1,4 +1,4 @@
-#- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bastion"
+#- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bastion"
- name: make the boxen be real for real
hosts: bastion
diff --git a/playbooks/groups/batcave.yml b/playbooks/groups/batcave.yml
index 19a5667..8907bef 100644
--- a/playbooks/groups/batcave.yml
+++ b/playbooks/groups/batcave.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=batcave"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=batcave"
- name: make the box be real
hosts: batcave
diff --git a/playbooks/groups/bodhi-backend.yml b/playbooks/groups/bodhi-backend.yml
index d60f613..a8ce720 100644
--- a/playbooks/groups/bodhi-backend.yml
+++ b/playbooks/groups/bodhi-backend.yml
@@ -5,7 +5,7 @@
# They also run some misc releng scripts.
#
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bodhi-backend:bodhi-backend-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bodhi-backend:bodhi-backend-stg"
# Once the instance exists, configure it.
diff --git a/playbooks/groups/bodhi2.yml b/playbooks/groups/bodhi2.yml
index 71af460..bb98402 100644
--- a/playbooks/groups/bodhi2.yml
+++ b/playbooks/groups/bodhi2.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bodhi2:bodhi2-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bodhi2:bodhi2-stg"
- name: make the box be real
hosts: bodhi2:bodhi2-stg
diff --git a/playbooks/groups/bugzilla.yml b/playbooks/groups/bugzilla.yml
index 63cf3ec..35aa3a6 100644
--- a/playbooks/groups/bugzilla.yml
+++ b/playbooks/groups/bugzilla.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/bugzilla* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bugzilla:bugzilla-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=bugzilla:bugzilla-stg"
- name: make the box be real
hosts: bugzilla-stg:bugzilla
diff --git a/playbooks/groups/buildvm.yml b/playbooks/groups/buildvm.yml
index 3cd5027..887cb0d 100644
--- a/playbooks/groups/buildvm.yml
+++ b/playbooks/groups/buildvm.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this builder on the buildvmhost
# NOTE: most of these vars_path come from group_vars/buildvm or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=buildvm:buildvm-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=buildvm:buildvm-stg"
- name: make koji builder(s)
hosts: buildvm:buildvm-stg:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390
diff --git a/playbooks/groups/darkserver-backend.yml b/playbooks/groups/darkserver-backend.yml
index 2c64953..24c819c 100644
--- a/playbooks/groups/darkserver-backend.yml
+++ b/playbooks/groups/darkserver-backend.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=darkserver-backend:darkserver-backend-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=darkserver-backend:darkserver-backend-stg"
- name: make the box be real
hosts: darkserver-backend:darkserver-backend-stg
diff --git a/playbooks/groups/darkserver-web.yml b/playbooks/groups/darkserver-web.yml
index a8ab841..310db35 100644
--- a/playbooks/groups/darkserver-web.yml
+++ b/playbooks/groups/darkserver-web.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=darkserver-web:darkserver-web-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=darkserver-web:darkserver-web-stg"
- name: make the box be real
hosts: darkserver-web:darkserver-web-stg
diff --git a/playbooks/groups/dhcp.yml b/playbooks/groups/dhcp.yml
index 23c041d..0978ebe 100644
--- a/playbooks/groups/dhcp.yml
+++ b/playbooks/groups/dhcp.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=dhcp"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=dhcp"
- name: make the box be real
hosts: dhcp
diff --git a/playbooks/groups/dns.yml b/playbooks/groups/dns.yml
index 6c0ef4b..9c3e1e3 100644
--- a/playbooks/groups/dns.yml
+++ b/playbooks/groups/dns.yml
@@ -1,6 +1,6 @@
# create a new dns server
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=dns"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=dns"
when: vmhost is defined
- name: make the box be real
diff --git a/playbooks/groups/fas.yml b/playbooks/groups/fas.yml
index fb9a9b6..b766734 100644
--- a/playbooks/groups/fas.yml
+++ b/playbooks/groups/fas.yml
@@ -1,6 +1,6 @@
# create a new fas server
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=fas:fas-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=fas:fas-stg"
- name: make the box be real
hosts: fas-stg:fas
diff --git a/playbooks/groups/github2fedmsg.yml b/playbooks/groups/github2fedmsg.yml
index 7b5abf3..381f3f0 100644
--- a/playbooks/groups/github2fedmsg.yml
+++ b/playbooks/groups/github2fedmsg.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/github2fedmsg* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=github2fedmsg:github2fedmsg-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=github2fedmsg:github2fedmsg-stg"
- name: make the box be real
hosts: github2fedmsg:github2fedmsg-stg
diff --git a/playbooks/groups/ipsilon.yml b/playbooks/groups/ipsilon.yml
index d2aa2dd..8be115d 100644
--- a/playbooks/groups/ipsilon.yml
+++ b/playbooks/groups/ipsilon.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/ipsilon* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=ipsilon:ipsilon-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=ipsilon:ipsilon-stg"
- name: make the box be real
hosts: ipsilon:ipsilon-stg
diff --git a/playbooks/groups/koji-hub.yml b/playbooks/groups/koji-hub.yml
index 8242a9f..1f4c6a6 100644
--- a/playbooks/groups/koji-hub.yml
+++ b/playbooks/groups/koji-hub.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: most of these vars_path come from group_vars/koji-hub or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=koji-stg:koji01.rpmfusion.org:koji02.rpmfusion.org:s390-koji01.qa..."
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=koji-stg:koji01.rpmfusion.org:koji02.rpmfusion.org:s390-koji01.qa..."
# Once the instance exists, configure it.
diff --git a/playbooks/groups/kojipkgs.yml b/playbooks/groups/kojipkgs.yml
index c17eb3a..4b53cf8 100644
--- a/playbooks/groups/kojipkgs.yml
+++ b/playbooks/groups/kojipkgs.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=kojipkgs"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=kojipkgs"
- name: make the boxen be real for real
hosts: kojipkgs
diff --git a/playbooks/groups/logserver.yml b/playbooks/groups/logserver.yml
index 16320a8..8b2c305 100644
--- a/playbooks/groups/logserver.yml
+++ b/playbooks/groups/logserver.yml
@@ -1,4 +1,4 @@
-#- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=log01.rpmfusion.org"
+#- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=log01.rpmfusion.org"
- name: make the box be real
hosts: hv01.online.rpmfusion.org
diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml
index f4ecca1..e978061 100644
--- a/playbooks/groups/mailman.yml
+++ b/playbooks/groups/mailman.yml
@@ -2,7 +2,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mailman:mailman-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mailman:mailman-stg"
- name: make the box be real
hosts: mailman-stg:mailman
diff --git a/playbooks/groups/mariadb-server.yml b/playbooks/groups/mariadb-server.yml
index fb92a99..34d987a 100644
--- a/playbooks/groups/mariadb-server.yml
+++ b/playbooks/groups/mariadb-server.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db03.rpmfusion.org:db03.stg.rpmfusion.org"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db03.rpmfusion.org:db03.stg.rpmfusion.org"
# Once the instance exists, configure it.
diff --git a/playbooks/groups/memcached.yml b/playbooks/groups/memcached.yml
index 27cc2a0..436889e 100644
--- a/playbooks/groups/memcached.yml
+++ b/playbooks/groups/memcached.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=memcached:memcached-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=memcached:memcached-stg"
- name: make the box be real
hosts: memcached:memcached-stg
diff --git a/playbooks/groups/mirrorlist2.yml b/playbooks/groups/mirrorlist2.yml
index 1c74d22..8777629 100644
--- a/playbooks/groups/mirrorlist2.yml
+++ b/playbooks/groups/mirrorlist2.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
-#- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mirrorlist2:mirrorlist2-stg"
+#- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mirrorlist2:mirrorlist2-stg"
- name: make the box be real
hosts: mirrorlist2:mirrorlist2-stg
diff --git a/playbooks/groups/mirrormanager.yml b/playbooks/groups/mirrormanager.yml
index 130814f..f75a065 100644
--- a/playbooks/groups/mirrormanager.yml
+++ b/playbooks/groups/mirrormanager.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mm:mm-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mm:mm-stg"
- name: make the boxe be real for real
hosts: mm:mm-stg
diff --git a/playbooks/groups/moin.yml b/playbooks/groups/moin.yml
index 127cb0e..a6439ea 100644
--- a/playbooks/groups/moin.yml
+++ b/playbooks/groups/moin.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/moin* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=moin:moin-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=moin:moin-stg"
- name: make the box be real
hosts: moin-stg:moin
diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml
index 8ccee02..0a53f82 100644
--- a/playbooks/groups/noc.yml
+++ b/playbooks/groups/noc.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=nagios:nagios-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=nagios:nagios-stg"
- name: make the box be real
hosts: nagios:nagios-stg
diff --git a/playbooks/groups/notifs-backend.yml b/playbooks/groups/notifs-backend.yml
index 5c2f79e..b2852f4 100644
--- a/playbooks/groups/notifs-backend.yml
+++ b/playbooks/groups/notifs-backend.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=notifs-backend:notifs-backend-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=notifs-backend:notifs-backend-stg"
- name: dole out the generic configuration
hosts: notifs-backend:notifs-backend-stg
diff --git a/playbooks/groups/notifs-web.yml b/playbooks/groups/notifs-web.yml
index 501df8c..fa19d6c 100644
--- a/playbooks/groups/notifs-web.yml
+++ b/playbooks/groups/notifs-web.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/notifs-web* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=notifs-web:notifs-web-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=notifs-web:notifs-web-stg"
- name: make the box be real
hosts: notifs-web:notifs-web-stg
diff --git a/playbooks/groups/osbs-master.yml b/playbooks/groups/osbs-master.yml
index 08bf760..625911e 100644
--- a/playbooks/groups/osbs-master.yml
+++ b/playbooks/groups/osbs-master.yml
@@ -1,5 +1,5 @@
# create an osbs server
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=osbs:osbs-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=osbs:osbs-stg"
- name: make the box be real
hosts: osbs:osbs-stg
@@ -38,7 +38,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{tasks}}/osbs_repos.yml"
+ - import_playbook: "{{tasks}}/osbs_repos.yml"
- name: copy docker-storage-setup config
copy:
diff --git a/playbooks/groups/packages.yml b/playbooks/groups/packages.yml
index 063faa2..f709d65 100644
--- a/playbooks/groups/packages.yml
+++ b/playbooks/groups/packages.yml
@@ -3,7 +3,7 @@
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/packages* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=packages:packages-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=packages:packages-stg"
- name: make the box be real
hosts: packages:packages-stg
diff --git a/playbooks/groups/pkgdb.yml b/playbooks/groups/pkgdb.yml
index dacd742..1b1f264 100644
--- a/playbooks/groups/pkgdb.yml
+++ b/playbooks/groups/pkgdb.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/pkgdb* or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=pkgdb:pkgdb-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=pkgdb:pkgdb-stg"
- name: make the box be real
hosts: pkgdb-stg:pkgdb
diff --git a/playbooks/groups/pkgs.yml b/playbooks/groups/pkgs.yml
index e7cb856..306c438 100644
--- a/playbooks/groups/pkgs.yml
+++ b/playbooks/groups/pkgs.yml
@@ -1,4 +1,4 @@
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=pkgs-stg:pkgs02.rpmfusion.org"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=pkgs-stg:pkgs02.rpmfusion.org"
- name: make the box be real
hosts: pkgs-stg:pkgs01.online.rpmfusion.net
@@ -40,12 +40,12 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml"
# setup minimal proxy includes
-- include: /srv/web/infra/ansible/playbooks/include/proxies-certificates.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-websites.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-reverseproxy.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-rewrites.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-redirects.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-fedora-web.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-certificates.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-websites.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-reverseproxy.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-rewrites.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-redirects.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-fedora-web.yml
- name: setup fedmsg on pkgs
hosts: pkgs-stg:pkgs01.online.rpmfusion.net
diff --git a/playbooks/groups/postgresql-server.yml b/playbooks/groups/postgresql-server.yml
index e72417a..db4c57c 100644
--- a/playbooks/groups/postgresql-server.yml
+++ b/playbooks/groups/postgresql-server.yml
@@ -2,7 +2,7 @@
# NOTE: should be used with --limit most of the time
# NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db02.online.rpmfusion.net"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db02.online.rpmfusion.net"
# Once the instance exists, configure it.
diff --git a/playbooks/groups/proxies.yml b/playbooks/groups/proxies.yml
index 15bc709..2d3171b 100644
--- a/playbooks/groups/proxies.yml
+++ b/playbooks/groups/proxies.yml
@@ -1,6 +1,6 @@
# create a new proxy server
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=proxies:proxies-stg"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=proxies:proxies-stg"
- name: make the box be real
hosts: proxies-stg:proxies
@@ -115,14 +115,14 @@
# out the proxy-specific configuration into a couple different sub-playbooks.
# Othewise, this file would be unbearably long.
-- include: /srv/web/infra/ansible/playbooks/include/proxies-certificates.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-websites.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-reverseproxy.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-rewrites.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-redirects.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-fedora-web.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-haproxy.yml
-- include: /srv/web/infra/ansible/playbooks/include/proxies-miscellaneous.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-certificates.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-websites.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-reverseproxy.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-rewrites.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-redirects.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-fedora-web.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-haproxy.yml
+- import_playbook: /srv/web/infra/ansible/playbooks/include/proxies-miscellaneous.yml
- name: Make sure we are deployed fully
hosts: proxies-stg:proxies
diff --git a/playbooks/groups/sign-bridge.yml b/playbooks/groups/sign-bridge.yml
index 56191dc..df7a97d 100644
--- a/playbooks/groups/sign-bridge.yml
+++ b/playbooks/groups/sign-bridge.yml
@@ -6,7 +6,7 @@
# Access is via management interface only. This playbook does initial setup.
# Please check with rel-eng before doing anything here.
-#- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=sign-bridge"
+#- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=sign-bridge"
- name: configure sign bridge server
hosts: sign-bridge
diff --git a/playbooks/groups/smtp-mm.yml b/playbooks/groups/smtp-mm.yml
index 9933e95..740dd65 100644
--- a/playbooks/groups/smtp-mm.yml
+++ b/playbooks/groups/smtp-mm.yml
@@ -1,6 +1,6 @@
# create smtp servers
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=smtp-mm"
+- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=smtp-mm"
- name: make the box be real
hosts: smtp-mm
diff --git a/playbooks/vhost_reboot.yml b/playbooks/vhost_reboot.yml
index d66a6c7..ea0b50f 100644
--- a/playbooks/vhost_reboot.yml
+++ b/playbooks/vhost_reboot.yml
@@ -34,7 +34,7 @@
with_items: vmlist.list_vms
# Call out to another playbook. Disable any proxies that may live here
-- include: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies
+- import_playbook: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies
when: nodns is not defined or not nodns
- name: halt instances
@@ -103,7 +103,7 @@
when: nonagios is not defined or not nonagios
# Call out to that dns playbook. Put proxies back in now that they're back
-- include: update-proxy-dns.yml status=enable proxies=myvms_new:&proxies
+- import_playbook: update-proxy-dns.yml status=enable proxies=myvms_new:&proxies
when: nodns is not defined or not nodns
- name: Fix unbound if necessary
diff --git a/playbooks/vhost_update.yml b/playbooks/vhost_update.yml
index 949ed74..9c82ab3 100644
--- a/playbooks/vhost_update.yml
+++ b/playbooks/vhost_update.yml
@@ -19,7 +19,7 @@
with_items: vmlist.list_vms
# Call out to another playbook. Disable any proxies that may live here
-#- include: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies
+#- import_playbook: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies
- name: update the system
hosts: "{{ target }}:myvms_new"
6 years, 10 months
[ansible] Update variable for tasks roles handlers
by Nicolas Chauvet
commit f25fbb9c9a24856d78921a4e6d12d573996d14cb
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 11:20:48 2018 +0100
Update variable for tasks roles handlers
playbooks/check-host.yml | 2 +-
playbooks/check_base.yml | 6 +++---
playbooks/cloud_prep.yml | 4 ++--
playbooks/groups/arm-packager.yml | 6 +++---
playbooks/groups/autosign.yml | 8 ++++----
playbooks/groups/backup-server.yml | 10 +++++-----
playbooks/groups/bastion.yml | 8 ++++----
playbooks/groups/batcave.yml | 8 ++++----
playbooks/groups/bodhi-backend.yml | 8 ++++----
playbooks/groups/bodhi2.yml | 10 +++++-----
playbooks/groups/bugzilla.yml | 10 +++++-----
playbooks/groups/buildhw.yml | 4 ++--
playbooks/groups/buildvm.yml | 10 +++++-----
playbooks/groups/darkserver-backend.yml | 12 ++++++------
playbooks/groups/darkserver-web.yml | 8 ++++----
playbooks/groups/dhcp.yml | 8 ++++----
playbooks/groups/dns.yml | 8 ++++----
playbooks/groups/fas.yml | 10 +++++-----
playbooks/groups/github2fedmsg.yml | 12 ++++++------
playbooks/groups/ipsilon.yml | 12 ++++++------
playbooks/groups/koji-hub.yml | 12 ++++++------
playbooks/groups/kojipkgs.yml | 8 ++++----
playbooks/groups/logserver.yml | 8 ++++----
playbooks/groups/mailman.yml | 12 ++++++------
playbooks/groups/mariadb-server.yml | 8 ++++----
playbooks/groups/memcached.yml | 8 ++++----
playbooks/groups/mirrorlist2.yml | 8 ++++----
playbooks/groups/mirrormanager.yml | 16 ++++++++--------
playbooks/groups/moin.yml | 10 +++++-----
playbooks/groups/noc.yml | 12 ++++++------
playbooks/groups/notifs-backend.yml | 10 +++++-----
playbooks/groups/notifs-web.yml | 10 +++++-----
playbooks/groups/osbs-master.yml | 8 ++++----
playbooks/groups/packages.yml | 16 ++++++++--------
playbooks/groups/pkgdb.yml | 14 +++++++-------
playbooks/groups/pkgs.yml | 10 +++++-----
playbooks/groups/postgresql-server.yml | 8 ++++----
playbooks/groups/proxies.yml | 16 ++++++++--------
playbooks/groups/sign-bridge.yml | 8 ++++----
playbooks/groups/smtp-mm.yml | 8 ++++----
playbooks/groups/squid.xml | 4 ++--
playbooks/groups/virthost.yml | 8 ++++----
playbooks/hosts/hv01.online.rpmfusion.net.yml | 6 +++---
playbooks/include/proxies-certificates.yml | 2 +-
playbooks/include/proxies-fedora-web.yml | 2 +-
playbooks/include/proxies-haproxy.yml | 2 +-
playbooks/include/proxies-redirects.yml | 2 +-
playbooks/include/proxies-reverseproxy.yml | 2 +-
playbooks/include/proxies-rewrites.yml | 2 +-
playbooks/include/proxies-websites.yml | 2 +-
playbooks/include/virt-create.yml | 4 ++--
playbooks/manual/kernel-qa.yml | 6 +++---
playbooks/manual/qadevel.yml | 14 +++++++-------
playbooks/manual/sign-vault.yml | 10 +++++-----
playbooks/manual/update-firmware.yml | 2 +-
playbooks/restart_unbound.yml | 2 +-
playbooks/update_ticketkey.yml | 4 ++--
playbooks/vhost_reboot.yml | 2 +-
58 files changed, 225 insertions(+), 225 deletions(-)
---
diff --git a/playbooks/check-host.yml b/playbooks/check-host.yml
index 7379e18..52e30d9 100644
--- a/playbooks/check-host.yml
+++ b/playbooks/check-host.yml
@@ -265,5 +265,5 @@
# handlers:
-# - include: "{{ handlers }}/restart_services.yml"
+# - import_tasks: "{{ handlers_path }}/restart_services.yml"
# - include: "restart_services.yml"
diff --git a/playbooks/check_base.yml b/playbooks/check_base.yml
index 9a4e037..f8a9a38 100644
--- a/playbooks/check_base.yml
+++ b/playbooks/check_base.yml
@@ -11,6 +11,6 @@
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
diff --git a/playbooks/cloud_prep.yml b/playbooks/cloud_prep.yml
index e592087..eee222a 100644
--- a/playbooks/cloud_prep.yml
+++ b/playbooks/cloud_prep.yml
@@ -7,8 +7,8 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/cloud_setup_basic.yml"
+ - import_tasks: "{{ tasks_path }}/cloud_setup_basic.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/arm-packager.yml b/playbooks/groups/arm-packager.yml
index f83a83f..9f6baff 100644
--- a/playbooks/groups/arm-packager.yml
+++ b/playbooks/groups/arm-packager.yml
@@ -12,7 +12,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- - include: "{{ tasks }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
roles:
- base
@@ -23,7 +23,7 @@
tasks:
# this is how you include other task lists
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
- name: install packager tools (dnf)
dnf: state=present pkg={{ item }}
@@ -42,4 +42,4 @@
- config
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/autosign.yml b/playbooks/groups/autosign.yml
index 1729d1b..369ab22 100644
--- a/playbooks/groups/autosign.yml
+++ b/playbooks/groups/autosign.yml
@@ -25,9 +25,9 @@
- sudo
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/backup-server.yml b/playbooks/groups/backup-server.yml
index 82bf97e..48723ba 100644
--- a/playbooks/groups/backup-server.yml
+++ b/playbooks/groups/backup-server.yml
@@ -28,10 +28,10 @@
- openvpn/client
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/rdiff_backup_server.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/rdiff_backup_server.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/bastion.yml b/playbooks/groups/bastion.yml
index 9a01aaf..d8990bf 100644
--- a/playbooks/groups/bastion.yml
+++ b/playbooks/groups/bastion.yml
@@ -22,12 +22,12 @@
- { role: packager_alias, when: not inventory_hostname.startswith('bastion-comm01') }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: configure bastion-qa
hosts: bastion-qa
diff --git a/playbooks/groups/batcave.yml b/playbooks/groups/batcave.yml
index 961eab4..19a5667 100644
--- a/playbooks/groups/batcave.yml
+++ b/playbooks/groups/batcave.yml
@@ -34,9 +34,9 @@
- { role: nfs/client, mnt_dir: '/mnt/fedora/app', nfs_src_dir: 'fedora_app/app' }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/bodhi-backend.yml b/playbooks/groups/bodhi-backend.yml
index 38780b3..d60f613 100644
--- a/playbooks/groups/bodhi-backend.yml
+++ b/playbooks/groups/bodhi-backend.yml
@@ -54,9 +54,9 @@
file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link
tags: bodhi
when: env == 'staging'
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/bodhi2.yml b/playbooks/groups/bodhi2.yml
index b9af783..71af460 100644
--- a/playbooks/groups/bodhi2.yml
+++ b/playbooks/groups/bodhi2.yml
@@ -24,10 +24,10 @@
- { role: fedmsg/base, when: "inventory_hostname.startswith('bodhi0')" }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/bugzilla.yml b/playbooks/groups/bugzilla.yml
index b903d70..63cf3ec 100644
--- a/playbooks/groups/bugzilla.yml
+++ b/playbooks/groups/bugzilla.yml
@@ -25,12 +25,12 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy bugzilla itself
@@ -47,4 +47,4 @@
- bugzilla
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/buildhw.yml b/playbooks/groups/buildhw.yml
index 35137fd..7e16dc6 100644
--- a/playbooks/groups/buildhw.yml
+++ b/playbooks/groups/buildhw.yml
@@ -31,9 +31,9 @@
when: not inventory_hostname.startswith('bkernel')
- import_tasks: "{{ tasks_path }}/motd.yml"
when: not inventory_hostname.startswith('bkernel')
- - include: "{{ tasks }}/create_swap_file.yml swap_file_path=/var/swap-file swap_file_bs=1M swap_file_count=4096"
+ - import_tasks: "{{ tasks_path }}/create_swap_file.yml swap_file_path=/var/swap-file swap_file_bs=1M swap_file_count=4096"
when: inventory_hostname.endswith('scaleway.rpmfusion.net')
- - include: "{{ tasks }}/openvpn_client.yml"
+ - import_tasks: "{{ tasks_path }}/openvpn_client.yml"
when: not datacenter == 'online'
- name: make sure kojid is running
diff --git a/playbooks/groups/buildvm.yml b/playbooks/groups/buildvm.yml
index ebc8238..3cd5027 100644
--- a/playbooks/groups/buildvm.yml
+++ b/playbooks/groups/buildvm.yml
@@ -16,7 +16,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- - include: "{{ tasks }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
roles:
- base
@@ -28,15 +28,15 @@
- koji_builder
tasks:
- - include: "{{ tasks }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
when: not inventory_hostname.startswith('bkernel')
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
when: not inventory_hostname.startswith('bkernel')
- - include: "{{ tasks }}/openvpn_client.yml"
+ - import_tasks: "{{ tasks_path }}/openvpn_client.yml"
when: not datacenter == 'online'
- name: make sure kojid is running
service: name=kojid state=running enabled=yes
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/darkserver-backend.yml b/playbooks/groups/darkserver-backend.yml
index 65b352f..2c64953 100644
--- a/playbooks/groups/darkserver-backend.yml
+++ b/playbooks/groups/darkserver-backend.yml
@@ -30,12 +30,12 @@
- role: apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up fedmsg basics
hosts: darkserver-backend:darkserver-backend-stg
@@ -51,7 +51,7 @@
- fedmsg/base
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: dole out the service-specific config
hosts: darkserver-backend:darkserver-backend-stg
@@ -70,4 +70,4 @@
process: fedmsg-hub
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/darkserver-web.yml b/playbooks/groups/darkserver-web.yml
index 24c3cff..a8ab841 100644
--- a/playbooks/groups/darkserver-web.yml
+++ b/playbooks/groups/darkserver-web.yml
@@ -30,10 +30,10 @@
- darkserver/web
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/dhcp.yml b/playbooks/groups/dhcp.yml
index 55f2572..23c041d 100644
--- a/playbooks/groups/dhcp.yml
+++ b/playbooks/groups/dhcp.yml
@@ -22,9 +22,9 @@
- tftp_server
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/dns.yml b/playbooks/groups/dns.yml
index ee69526..6c0ef4b 100644
--- a/playbooks/groups/dns.yml
+++ b/playbooks/groups/dns.yml
@@ -26,9 +26,9 @@
- dns
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/fas.yml b/playbooks/groups/fas.yml
index a434c4a..fb9a9b6 100644
--- a/playbooks/groups/fas.yml
+++ b/playbooks/groups/fas.yml
@@ -29,10 +29,10 @@
# - totpcgi
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/github2fedmsg.yml b/playbooks/groups/github2fedmsg.yml
index ac8264a..7b5abf3 100644
--- a/playbooks/groups/github2fedmsg.yml
+++ b/playbooks/groups/github2fedmsg.yml
@@ -29,13 +29,13 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy service-specific config
hosts: github2fedmsg:github2fedmsg-stg
@@ -48,7 +48,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- github2fedmsg
diff --git a/playbooks/groups/ipsilon.yml b/playbooks/groups/ipsilon.yml
index af6d6fd..d2aa2dd 100644
--- a/playbooks/groups/ipsilon.yml
+++ b/playbooks/groups/ipsilon.yml
@@ -26,13 +26,13 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy ipsilon itself
hosts: ipsilon:ipsilon-stg
@@ -48,4 +48,4 @@
- ipsilon
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/koji-hub.yml b/playbooks/groups/koji-hub.yml
index b6dfe9e..8242a9f 100644
--- a/playbooks/groups/koji-hub.yml
+++ b/playbooks/groups/koji-hub.yml
@@ -17,8 +17,8 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- - include: "{{ tasks }}/osbs_certs.yml"
- - include: "{{ tasks }}/osbs_repos.yml"
+ - import_tasks: "{{ tasks_path }}/osbs_certs.yml"
+ - import_tasks: "{{ tasks_path }}/osbs_repos.yml"
roles:
- base
@@ -59,12 +59,12 @@
file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link
tags: koji_hub
when: env == 'staging'
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
#- name: Start the kojid builder daemon, but only on staging.
diff --git a/playbooks/groups/kojipkgs.yml b/playbooks/groups/kojipkgs.yml
index d2baa22..c17eb3a 100644
--- a/playbooks/groups/kojipkgs.yml
+++ b/playbooks/groups/kojipkgs.yml
@@ -31,9 +31,9 @@
- kojipkgs
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/logserver.yml b/playbooks/groups/logserver.yml
index 20712db..16320a8 100644
--- a/playbooks/groups/logserver.yml
+++ b/playbooks/groups/logserver.yml
@@ -24,9 +24,9 @@
- awstats
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
#
# We exclude some dirs from restorecon on updates on logservers as they are very large
@@ -36,5 +36,5 @@
copy: src="{{ files }}/logserver/fixfiles_exclude_dirs" dest=/etc/selinux/fixfiles_exclude_dirs owner=root mode=0644
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml
index 2fbb2aa..f4ecca1 100644
--- a/playbooks/groups/mailman.yml
+++ b/playbooks/groups/mailman.yml
@@ -27,13 +27,13 @@
tasks:
# this is how you include other task lists
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
#
@@ -118,4 +118,4 @@
- postfix
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/mariadb-server.yml b/playbooks/groups/mariadb-server.yml
index f03cb01..fb92a99 100644
--- a/playbooks/groups/mariadb-server.yml
+++ b/playbooks/groups/mariadb-server.yml
@@ -27,11 +27,11 @@
- sudo
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
# TODO: add iscsi task
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/memcached.yml b/playbooks/groups/memcached.yml
index 0e0fea2..27cc2a0 100644
--- a/playbooks/groups/memcached.yml
+++ b/playbooks/groups/memcached.yml
@@ -22,9 +22,9 @@
- memcached
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/mirrorlist2.yml b/playbooks/groups/mirrorlist2.yml
index 3cf1ddf..1c74d22 100644
--- a/playbooks/groups/mirrorlist2.yml
+++ b/playbooks/groups/mirrorlist2.yml
@@ -24,8 +24,8 @@
tags:
- packages
- base
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
- name: Install policycoreutils-python
yum: pkg=policycoreutils-python state=present
@@ -42,7 +42,7 @@
tasks:
# this is how you include other task lists
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
roles:
- hosts
@@ -50,4 +50,4 @@
- mirrormanager/mirrorlist2
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/mirrormanager.yml b/playbooks/groups/mirrormanager.yml
index 57cd531..130814f 100644
--- a/playbooks/groups/mirrormanager.yml
+++ b/playbooks/groups/mirrormanager.yml
@@ -22,12 +22,12 @@
- { role: nfs/client, when: inventory_hostname.startswith('mm-backend01'), mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Deploy the backend
hosts: mm-backend:mm-backend-stg
@@ -45,7 +45,7 @@
- geoip
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Deploy the crawler
hosts: mm-crawler:mm-crawler-stg
@@ -64,7 +64,7 @@
- { role: openvpn/client, when: datacenter != "online" }
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Deploy the frontend (web-app)
hosts: mm-frontend:mm-frontend-stg
@@ -80,7 +80,7 @@
- mirrormanager/frontend2
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
# Do this one last, since the mirrormanager user needs to exist so that it can
# own the fedmsg certs we put in place here.
@@ -98,4 +98,4 @@
- fedmsg/base
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/moin.yml b/playbooks/groups/moin.yml
index 7bdb014..127cb0e 100644
--- a/playbooks/groups/moin.yml
+++ b/playbooks/groups/moin.yml
@@ -25,12 +25,12 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy moin itself
@@ -47,4 +47,4 @@
- moin
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml
index c8ad9a1..8ccee02 100644
--- a/playbooks/groups/noc.yml
+++ b/playbooks/groups/noc.yml
@@ -24,13 +24,13 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy service-specific config (just for production)
hosts: nagios
@@ -44,7 +44,7 @@
- "/srv/web/infra/ansible/vars/nagios.{{ inventory_hostname_short }}.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- { role: dhcp_server, when: datacenter == 'online' }
diff --git a/playbooks/groups/notifs-backend.yml b/playbooks/groups/notifs-backend.yml
index 4a34c1c..5c2f79e 100644
--- a/playbooks/groups/notifs-backend.yml
+++ b/playbooks/groups/notifs-backend.yml
@@ -30,12 +30,12 @@
# when: env != "staging" }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: dole out the service-specific config
hosts: notifs-backend:notifs-backend-stg
@@ -63,4 +63,4 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/notifs-web.yml b/playbooks/groups/notifs-web.yml
index afb8c7f..501df8c 100644
--- a/playbooks/groups/notifs-web.yml
+++ b/playbooks/groups/notifs-web.yml
@@ -30,10 +30,10 @@
when: env != "staging" }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/osbs-master.yml b/playbooks/groups/osbs-master.yml
index ff54033..08bf760 100644
--- a/playbooks/groups/osbs-master.yml
+++ b/playbooks/groups/osbs-master.yml
@@ -22,12 +22,12 @@
- sudo
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: pre-install osbs tasks
hosts: osbs:osbs-stg
diff --git a/playbooks/groups/packages.yml b/playbooks/groups/packages.yml
index a1e0632..063faa2 100644
--- a/playbooks/groups/packages.yml
+++ b/playbooks/groups/packages.yml
@@ -29,13 +29,13 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up gluster server on prod
hosts: packages
@@ -57,7 +57,7 @@
datadir: /srv/glusterfs/packages
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up gluster client on prod
hosts: packages
@@ -83,7 +83,7 @@
mountdir: /var/cache/fedoracommunity
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: dole out the new service specific config
hosts: packages:packages-stg
@@ -102,4 +102,4 @@
process: fedmsg-hub
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/pkgdb.yml b/playbooks/groups/pkgdb.yml
index a144989..dacd742 100644
--- a/playbooks/groups/pkgdb.yml
+++ b/playbooks/groups/pkgdb.yml
@@ -25,13 +25,13 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/mod_wsgi.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up fedmsg on pkgdb
hosts: pkgdb-stg:pkgdb
@@ -47,7 +47,7 @@
- fedmsg/base
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: deploy pkgdb itself
hosts: pkgdb-stg:pkgdb
@@ -63,4 +63,4 @@
- pkgdb2
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/pkgs.yml b/playbooks/groups/pkgs.yml
index 11828d0..e7cb856 100644
--- a/playbooks/groups/pkgs.yml
+++ b/playbooks/groups/pkgs.yml
@@ -32,12 +32,12 @@
tags: distgit
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
# setup minimal proxy includes
- include: /srv/web/infra/ansible/playbooks/include/proxies-certificates.yml
@@ -63,4 +63,4 @@
- fedmsg/hub
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/postgresql-server.yml b/playbooks/groups/postgresql-server.yml
index 47cf53d..e72417a 100644
--- a/playbooks/groups/postgresql-server.yml
+++ b/playbooks/groups/postgresql-server.yml
@@ -29,11 +29,11 @@
- koji_db
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
# TODO: add iscsi task
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/proxies.yml b/playbooks/groups/proxies.yml
index 271fd08..15bc709 100644
--- a/playbooks/groups/proxies.yml
+++ b/playbooks/groups/proxies.yml
@@ -24,18 +24,18 @@
- apache
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
# You might think we would want these tasks on the proxy nodes, but they
# actually deliver a configuration that our proxy-specific roles below then go
# and overwrite... so, let's just leave them out.
- #- include: "{{ tasks }}/apache.yml"
- #- include: "{{ tasks }}/mod_wsgi.yml"
+ #- import_tasks: "{{ tasks_path }}/apache.yml"
+ #- import_tasks: "{{ tasks_path }}/mod_wsgi.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
# TODO
@@ -67,7 +67,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
#
@@ -135,7 +135,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
#
diff --git a/playbooks/groups/sign-bridge.yml b/playbooks/groups/sign-bridge.yml
index ebd038b..56191dc 100644
--- a/playbooks/groups/sign-bridge.yml
+++ b/playbooks/groups/sign-bridge.yml
@@ -31,9 +31,9 @@
- sigul/bridge
tasks:
- - include: "{{ tasks }}/motd.yml"
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/smtp-mm.yml b/playbooks/groups/smtp-mm.yml
index 44db455..9933e95 100644
--- a/playbooks/groups/smtp-mm.yml
+++ b/playbooks/groups/smtp-mm.yml
@@ -24,9 +24,9 @@
when: env != "staging" }
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/groups/squid.xml b/playbooks/groups/squid.xml
index 2dd9367..7306b2a 100644
--- a/playbooks/groups/squid.xml
+++ b/playbooks/groups/squid.xml
@@ -24,8 +24,8 @@
- squid
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
+ - include: "{{ tasks_path }}/yumrepos.yml"
+ - include: "{{ tasks_path }}/motd.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
diff --git a/playbooks/groups/virthost.yml b/playbooks/groups/virthost.yml
index 0269d3f..d1c1377 100644
--- a/playbooks/groups/virthost.yml
+++ b/playbooks/groups/virthost.yml
@@ -25,9 +25,9 @@
- virthost
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/hosts/hv01.online.rpmfusion.net.yml b/playbooks/hosts/hv01.online.rpmfusion.net.yml
index f2caeed..4e89e64 100644
--- a/playbooks/hosts/hv01.online.rpmfusion.net.yml
+++ b/playbooks/hosts/hv01.online.rpmfusion.net.yml
@@ -28,8 +28,8 @@
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/include/proxies-certificates.yml b/playbooks/include/proxies-certificates.yml
index ffcff93..8ecea0f 100644
--- a/playbooks/include/proxies-certificates.yml
+++ b/playbooks/include/proxies-certificates.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-fedora-web.yml b/playbooks/include/proxies-fedora-web.yml
index 917221a..b59fb00 100644
--- a/playbooks/include/proxies-fedora-web.yml
+++ b/playbooks/include/proxies-fedora-web.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-haproxy.yml b/playbooks/include/proxies-haproxy.yml
index 4f5ad75..1158351 100644
--- a/playbooks/include/proxies-haproxy.yml
+++ b/playbooks/include/proxies-haproxy.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-redirects.yml b/playbooks/include/proxies-redirects.yml
index 22e93d9..9638be2 100644
--- a/playbooks/include/proxies-redirects.yml
+++ b/playbooks/include/proxies-redirects.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-reverseproxy.yml b/playbooks/include/proxies-reverseproxy.yml
index bd47797..c8d5239 100644
--- a/playbooks/include/proxies-reverseproxy.yml
+++ b/playbooks/include/proxies-reverseproxy.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-rewrites.yml b/playbooks/include/proxies-rewrites.yml
index 41cf042..78b1109 100644
--- a/playbooks/include/proxies-rewrites.yml
+++ b/playbooks/include/proxies-rewrites.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml
index 09839ec..d01ea87 100644
--- a/playbooks/include/proxies-websites.yml
+++ b/playbooks/include/proxies-websites.yml
@@ -9,7 +9,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
diff --git a/playbooks/include/virt-create.yml b/playbooks/include/virt-create.yml
index 061c3cd..48efb79 100644
--- a/playbooks/include/virt-create.yml
+++ b/playbooks/include/virt-create.yml
@@ -8,8 +8,8 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/virt_instance_create.yml"
+ - import_tasks: "{{ tasks_path }}/virt_instance_create.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/manual/kernel-qa.yml b/playbooks/manual/kernel-qa.yml
index b7b9dae..49766db 100644
--- a/playbooks/manual/kernel-qa.yml
+++ b/playbooks/manual/kernel-qa.yml
@@ -21,9 +21,9 @@
- hosts
tasks:
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/manual/qadevel.yml b/playbooks/manual/qadevel.yml
index 6105d36..52d318b 100644
--- a/playbooks/manual/qadevel.yml
+++ b/playbooks/manual/qadevel.yml
@@ -14,10 +14,10 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/virt_instance_create.yml"
+ - import_tasks: "{{ tasks_path }}/virt_instance_create.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: make the box be real
hosts: qadevel;qadevel-stg
@@ -38,10 +38,10 @@
- sudo
tasks:
- - include: "{{ tasks }}/hosts.yml"
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/2fa_client.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/hosts.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/2fa_client.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/manual/sign-vault.yml b/playbooks/manual/sign-vault.yml
index 2c95873..e73a4fa 100644
--- a/playbooks/manual/sign-vault.yml
+++ b/playbooks/manual/sign-vault.yml
@@ -17,10 +17,10 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/virt_instance_create.yml"
+ - import_tasks: "{{ tasks_path }}/virt_instance_create.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: make sign vault server
hosts: sign-vault
@@ -39,8 +39,8 @@
- sigul/server
tasks:
- - include: "{{ tasks }}/yumrepos.yml"
- - include: "{{ tasks }}/motd.yml"
+ - import_tasks: "{{ tasks_path }}/yumrepos.yml"
+ - import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
diff --git a/playbooks/manual/update-firmware.yml b/playbooks/manual/update-firmware.yml
index 9660fba..a065fc1 100644
--- a/playbooks/manual/update-firmware.yml
+++ b/playbooks/manual/update-firmware.yml
@@ -24,7 +24,7 @@
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
vars:
- updates:
diff --git a/playbooks/restart_unbound.yml b/playbooks/restart_unbound.yml
index 6c28bf5..782b14e 100644
--- a/playbooks/restart_unbound.yml
+++ b/playbooks/restart_unbound.yml
@@ -13,4 +13,4 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/restart_unbound.yml"
+ - import_tasks: "{{ tasks_path }}/restart_unbound.yml"
diff --git a/playbooks/update_ticketkey.yml b/playbooks/update_ticketkey.yml
index ee0774b..184c7d0 100644
--- a/playbooks/update_ticketkey.yml
+++ b/playbooks/update_ticketkey.yml
@@ -8,7 +8,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: create new production ticket key
@@ -27,7 +27,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- - include: "{{ handlers }}/restart_services.yml"
+ - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
diff --git a/playbooks/vhost_reboot.yml b/playbooks/vhost_reboot.yml
index 257ca24..d66a6c7 100644
--- a/playbooks/vhost_reboot.yml
+++ b/playbooks/vhost_reboot.yml
@@ -116,7 +116,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- - include: "{{ tasks }}/restart_unbound.yml"
+ - import_tasks: "{{ tasks_path }}/restart_unbound.yml"
# - name: get info on guests (postreboot)
# virt: command=info
6 years, 10 months
[ansible] Remove reserved name for variable
by Nicolas Chauvet
commit d32a338423ff9e2fba4ac62bb5759029972ba75b
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 6 10:45:51 2018 +0100
Remove reserved name for variable
vars/global.yml | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/vars/global.yml b/vars/global.yml
index cbee078..d30f65f 100644
--- a/vars/global.yml
+++ b/vars/global.yml
@@ -55,6 +55,3 @@ global_pkgs_inst: ['bind-utils', 'mailx', 'nc', 'openssh-clients',
'tmpwatch', 'traceroute', 'vim-enhanced', 'xz', 'zsh',
'libselinux-python', 'ntpdate', 'bash-completion', 'telnet',
'htop', 'rsyslog' ]
-
-# become: False by default so ansible doesn't try and check for it and hang
-become: False
6 years, 10 months