From 7abcf6e0b94ebf37844c9efd25c14fc0b3fa7e90 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 9 Dec 2016 10:38:45 +0100 Subject: [PATCH] Remove requiretty from sudoers to actually make pipelining work Some systems (e.g. CentOS on Azure) have requiretty in sudoers which makes pipelining fail. --- cluster.yml | 2 ++ roles/bootstrap-os/tasks/main.yml | 4 +++- roles/bootstrap-os/tasks/setup-pipelining.yml | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 roles/bootstrap-os/tasks/setup-pipelining.yml diff --git a/cluster.yml b/cluster.yml index 9bb149fd2..863f0669b 100644 --- a/cluster.yml +++ b/cluster.yml @@ -2,6 +2,8 @@ - hosts: all any_errors_fatal: true gather_facts: false + vars: + ansible_ssh_pipelining: false roles: - bootstrap-os tags: diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index 5d084ec74..a3ebeb8f2 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -3,4 +3,6 @@ when: bootstrap_os == "ubuntu" - include: bootstrap-coreos.yml - when: bootstrap_os == "coreos" \ No newline at end of file + when: bootstrap_os == "coreos" + +- include: setup-pipelining.yml diff --git a/roles/bootstrap-os/tasks/setup-pipelining.yml b/roles/bootstrap-os/tasks/setup-pipelining.yml new file mode 100644 index 000000000..ca216cc3b --- /dev/null +++ b/roles/bootstrap-os/tasks/setup-pipelining.yml @@ -0,0 +1,6 @@ +--- +# Remove requiretty to make ssh pipelining work + +- name: Remove require tty + lineinfile: regexp="^\w+\s+requiretty" dest=/etc/sudoers state=absent +