From owner-freebsd-ports-bugs@freebsd.org Thu Sep 3 00:53:19 2015 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82D709C8B17 for ; Thu, 3 Sep 2015 00:53:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5B91E17 for ; Thu, 3 Sep 2015 00:53:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t830rJ1H096010 for ; Thu, 3 Sep 2015 00:53:19 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 202799] sysutils/ansible: SHEBANG_FILES breaks ansible_python_interpreter and makes it impossible to manage non-freebsd hosts Date: Thu, 03 Sep 2015 00:53:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: merlin@merlinsbox.net X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 00:53:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202799 --- Comment #2 from merlin@merlinsbox.net --- It is incorrect to do it for the modules, direct from the ansible developers. Please take it up with them if you are not willing to take my word for it. Better yet, let's take a look at their coding guidelines: https://github.com/ansible/ansible/blob/devel/CODING_GUIDELINES.md """module code should still use '/usr/bin/python' as this is replaced automatically by 'ansible_python_interpreter', see the FAQ in the docs for more info.""" Their code looks for that specific shebang line otherwise it cannot make use of the variable "ansible_python_interpreter", which is necessary from FreeBSD to a Linux target because FreeBSD keeps python in /usr/local whilst Linux keeps python in /usr/bin. I suspect your centos image is modified. I do not accept the idea I should modify all target hosts. Here's what I did, root shell denoted by shell# and regular by shell$: shell# cd /usr/ports/sysutils/ansible shell# cp Makefile.orig Makefile shell# pkg delete -y ansible shell# portmaster sysutils/ansible -- Now I've got the incorrectly shebang fixed modules. I'll run ping module against my three test machines (FreeBSD 10.2, Debian 8.1, Centos 7.1, respectively) -- shell$ ansible -i inventory -m ping all debiansible | FAILED >> { "failed": true, "msg": "/bin/sh: 1: /usr/local/bin/python2.7: not found\r\nOpenSSH_6.6.1p1, OpenSSL 1.0.1p-freebsd 9 Jul 2015\r\ndebug1: Reading configuration data /home/merlin/.ssh/config\r\ndebug1: /home/merlin/.ssh/config line 8: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: mux_client_request_session: master session id: 2\r\nShared connection to debiansible closed.\r\n", "parsed": false } ansibeastie | success >> { "changed": false, "ping": "pong" } ancentos | FAILED >> { "failed": true, "msg": "/bin/sh: /usr/local/bin/python2.7: No such file or directory\r\nOpenSSH_6.6.1p1, OpenSSL 1.0.1p-freebsd 9 Jul 2015\r\ndebug1: Reading configuration data /home/merlin/.ssh/config\r\ndebug1: /home/merlin/.ssh/config line 8: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: mux_client_request_session: master session id: 2\r\nShared connection to ancentos closed.\r\n", "parsed": false } shell# cp Makefile.fixed Makefile shell# pkg delete -y ansible shell# portmaster sysutils/ansible -- Now I've got the correctly NOT shebang fixed modules. I'll run ping module against my three test machines (FreeBSD 10.2, Debian 8.1, Centos 7.1, respectively) -- shell$ ansible -i inventory -m ping all debiansible | success >> { "changed": false, "ping": "pong" } ansibeastie | success >> { "changed": false, "ping": "pong" } ancentos | success >> { "changed": false, "ping": "pong" } shell$ cat inventory [freebsd] ansibeastie [debian] debiansible [centos] ancentos [freebsd:vars] ansible_ssh_user=freebsd-admin ansible_python_interpreter=/usr/local/bin/python2.7 [debian:vars] ansible_ssh_user=debian-admin ansible_python_interpreter=/usr/bin/python [centos:vars] ansible_ssh_user=centos-admin ansible_python_interpreter=/usr/bin/python -- You are receiving this mail because: You are the assignee for the bug.