From e882ec3b7a3013eac1deb3859ed81d21d36a61e9 Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Wed, 28 Jun 2017 11:42:04 -0400 Subject: etcd_migrate: Add /usr/local/bin to path for oadm There are cases where ansible may not keep the expected environment PATH. This change adds /usr/local/bin to the PATH on the oadm call. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1464010 --- roles/etcd_migrate/tasks/migrate.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/etcd_migrate/tasks/migrate.yml b/roles/etcd_migrate/tasks/migrate.yml index 27eb945aa..eb1844fea 100644 --- a/roles/etcd_migrate/tasks/migrate.yml +++ b/roles/etcd_migrate/tasks/migrate.yml @@ -31,6 +31,8 @@ name: "{{ l_etcd_service }}" state: started +# NOTE: /usr/local/bin may be removed from the PATH by ansible hence why +# it's added to the environment in this task. - name: Re-introduce leases (as a replacement for key TTLs) command: > oadm migrate etcd-ttl \ @@ -42,6 +44,7 @@ --lease-duration 1h environment: ETCDCTL_API: 3 + PATH: "/usr/local/bin:{{ ansible_env.PATH }}" with_items: - "/kubernetes.io/events" - "/kubernetes.io/masterleases" -- cgit v1.2.3 From 8bf5a2dd7dde62b45d49a3cd8cee1bfe163d54ed Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Wed, 28 Jun 2017 12:57:25 -0400 Subject: etcd_migrate: Add /var/usrlocal/bin to path for oadm --- roles/etcd_migrate/tasks/migrate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/etcd_migrate/tasks/migrate.yml b/roles/etcd_migrate/tasks/migrate.yml index eb1844fea..7f441568a 100644 --- a/roles/etcd_migrate/tasks/migrate.yml +++ b/roles/etcd_migrate/tasks/migrate.yml @@ -44,7 +44,7 @@ --lease-duration 1h environment: ETCDCTL_API: 3 - PATH: "/usr/local/bin:{{ ansible_env.PATH }}" + PATH: "/usr/local/bin:/var/usrlocal/bin:{{ ansible_env.PATH }}" with_items: - "/kubernetes.io/events" - "/kubernetes.io/masterleases" -- cgit v1.2.3