From 3b910f106bbc20e6794ff172ac58ce735330e300 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Mon, 19 Jun 2017 09:51:43 -0700 Subject: [PATCH] Use distro specific netcat package names Update the memcached-flush upgrade playbook with the correct distro specific name of the netcat package and fix a typo in the 'ansible_os_family' variable name. Change-Id: I140bcf45ca4c7b338b2fec69188a80d4226fb2cb --- scripts/upgrade-utilities/playbooks/memcached-flush.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade-utilities/playbooks/memcached-flush.yml b/scripts/upgrade-utilities/playbooks/memcached-flush.yml index 47ec5dbcc0..4c56047fef 100644 --- a/scripts/upgrade-utilities/playbooks/memcached-flush.yml +++ b/scripts/upgrade-utilities/playbooks/memcached-flush.yml @@ -21,11 +21,14 @@ memcached_conf_dest: debian: "/etc/memcached.conf" redhat: "/etc/sysconfig/memcached" + netcat_package: + debian: "netcat-openbsd" + redhat: "nmap-ncat" tasks: - - name: Ensuring nc is installed + - name: Ensuring netcat is installed package: - name: nc + name: "{{ netcat_package.get(ansible_os_family | lower) }}" state: present - name: Flush all of the cache in memcached shell: | - echo 'flush_all' | nc $(awk '/^\-l/ {print $2}' {{ memcached_conf_dest.get(ansible_os_family | lower) }} | awk -F, '{ print $1 }') $(awk '/^\-p/ {print $2}' {{ memcached_conf_dest.get(ansible_family | lower) }} ) + echo 'flush_all' | nc $(awk '/^\-l/ {print $2}' {{ memcached_conf_dest.get(ansible_os_family | lower) }} | awk -F, '{ print $1 }') $(awk '/^\-p/ {print $2}' {{ memcached_conf_dest.get(ansible_os_family | lower) }} )