diff options
author | lifanov <lifanov@FreeBSD.org> | 2018-07-02 07:27:22 +0800 |
---|---|---|
committer | lifanov <lifanov@FreeBSD.org> | 2018-07-02 07:27:22 +0800 |
commit | 259de978a4ed1fa7c04966137bf4b59579c1c36a (patch) | |
tree | f73567fc1fd768834bbda74c47d294e5536deadf /sysutils/ansible | |
parent | f4cdea80933d01599a7dd93b3458b32828249d3f (diff) | |
download | freebsd-ports-gnome-259de978a4ed1fa7c04966137bf4b59579c1c36a.tar.gz freebsd-ports-gnome-259de978a4ed1fa7c04966137bf4b59579c1c36a.tar.zst freebsd-ports-gnome-259de978a4ed1fa7c04966137bf4b59579c1c36a.zip |
update sysutils/ansible to 2.6.0
This also introduces sysutils/ansible25 port to track 2.5 release branch.
Changes: https://github.com/ansible/ansible/blob/v2.6.0/changelogs/CHANGELOG-v2.6.rst
Diffstat (limited to 'sysutils/ansible')
-rw-r--r-- | sysutils/ansible/Makefile | 4 | ||||
-rw-r--r-- | sysutils/ansible/distinfo | 6 | ||||
-rw-r--r-- | sysutils/ansible/files/extra-patch-sesu | 68 |
3 files changed, 32 insertions, 46 deletions
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile index 9401918a12d8..c453a814785a 100644 --- a/sysutils/ansible/Makefile +++ b/sysutils/ansible/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= ansible -PORTVERSION?= 2.5.5 +PORTVERSION?= 2.6.0 PORTREVISION?= 0 CATEGORIES= sysutils python MASTER_SITES= http://releases.ansible.com/ansible/ @@ -28,7 +28,7 @@ TEST_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} -CONFLICTS?= ansible1-* ansible23-* ansible24-* +CONFLICTS?= ansible1-* ansible23-* ansible24-* ansible25-* EXTRA_PATCHES?= ${FILESDIR}/extra-patch-sesu diff --git a/sysutils/ansible/distinfo b/sysutils/ansible/distinfo index ebeb76aa9d39..0d7936f3aff6 100644 --- a/sysutils/ansible/distinfo +++ b/sysutils/ansible/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1529272911 -SHA256 (ansible-2.5.5.tar.gz) = d7e5aae60c0e76c824bf8a410fe247b5c4afcfaee272f6283b4f996d237e365a -SIZE (ansible-2.5.5.tar.gz) = 10150862 +TIMESTAMP = 1530484774 +SHA256 (ansible-2.6.0.tar.gz) = 3550bf16bf2c34cc88bf3870e91b836e44c1c288d148968c4d855dae2560faf5 +SIZE (ansible-2.6.0.tar.gz) = 10721104 diff --git a/sysutils/ansible/files/extra-patch-sesu b/sysutils/ansible/files/extra-patch-sesu index 194f19137d6d..845594ee16bc 100644 --- a/sysutils/ansible/files/extra-patch-sesu +++ b/sysutils/ansible/files/extra-patch-sesu @@ -1,66 +1,51 @@ -See: - - https://github.com/ansible/ansible/pull/27376 - ---- lib/ansible/constants.py +--- lib/ansible/constants.py.orig 2018-06-28 23:30:34 UTC +++ lib/ansible/constants.py -@@ -60,6 +60,19 @@ +@@ -59,8 +59,9 @@ def set_constant(name, value, export=var + # CONSTANTS ### yes, actual ones --BECOME_METHODS = ['sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun', 'enable'] -+BECOME_METHODS = [ -+ 'sesu', -+ 'sudo', -+ 'su', -+ 'pbrun', -+ 'pfexec', -+ 'doas', -+ 'dzdo', -+ 'ksu', -+ 'runas', -+ 'pmrun', -+ 'enable' -+] +-BECOME_METHODS = ['sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun', 'enable', 'machinectl'] ++BECOME_METHODS = ['sesu', 'sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun', 'enable', 'machinectl'] BECOME_ERROR_STRINGS = { + 'sesu': '', 'sudo': 'Sorry, try again.', 'su': 'Authentication failure', -@@ -73,4 +85,5 @@ + 'pbrun': '', +@@ -73,6 +74,7 @@ BECOME_ERROR_STRINGS = { + 'machinectl': '', } # FIXME: deal with i18n BECOME_MISSING_STRINGS = { + 'sesu': '', 'sudo': 'sorry, a password is required to run sudo', 'su': '', ---- lib/ansible/modules/commands/command.py + 'pbrun': '', +--- lib/ansible/modules/commands/command.py.orig 2018-06-28 23:30:34 UTC +++ lib/ansible/modules/commands/command.py -@@ -105,7 +105,7 @@ +@@ -142,7 +142,7 @@ def check_command(module, commandline): 'mount': 'mount', 'rpm': 'yum, dnf or zypper', 'yum': 'yum', 'apt-get': 'apt', - 'tar': 'unarchive', 'unzip': 'unarchive', 'sed': 'template or lineinfile', + 'tar': 'unarchive', 'unzip': 'unarchive', 'sed': 'replace, lineinfile or template', 'dnf': 'dnf', 'zypper': 'zypper'} -- become = ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'pmrun'] -+ become = ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'pmrun', 'sesu'] - command = os.path.basename(commandline.split()[0]) - if command in arguments: - module.warn("Consider using file module with %s rather than running %s" % (arguments[command], command)) ---- lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py +- become = ['sudo', 'su', 'pbrun', 'pfexec', 'runas', 'pmrun', 'machinectl'] ++ become = ['sesu', 'sudo', 'su', 'pbrun', 'pfexec', 'runas', 'pmrun', 'machinectl'] + if isinstance(commandline, list): + command = commandline[0] + else: +--- lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py.orig 2018-06-28 23:30:34 UTC +++ lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py -@@ -123,9 +123,9 @@ - default: null +@@ -96,7 +96,7 @@ options: become_method: description: -- - Become method to Use for privledge escalation. -+ - Become method to Use for privilege escalation. - required: False + - Become method to Use for privledge escalation. - choices: ["None", "sudo", "su", "pbrun", "pfexec", "pmrun"] -+ choices: ["None", "sudo", "su", "pbrun", "pfexec", "pmrun", "sesu"] - default: "None" ++ choices: ["None", "sesu", "sudo", "su", "pbrun", "pfexec", "pmrun"] become_username: description: ---- lib/ansible/playbook/play_context.py + - Become username. Use ASK for prompting. +--- lib/ansible/playbook/play_context.py.orig 2018-06-28 23:30:34 UTC +++ lib/ansible/playbook/play_context.py -@@ -599,6 +599,13 @@ def detect_ksu_prompt(b_data): - prompt = 'Enter UPM user password:' - becomecmd = '%s %s %s' % (exe, flags, shlex_quote(command)) +@@ -562,6 +562,13 @@ class PlayContext(Base): + exe = self.become_exe or 'machinectl' + becomecmd = '%s shell -q %s %s@ %s' % (exe, flags, self.become_user, command) + elif self.become_method == 'sesu': + @@ -71,3 +56,4 @@ See: + else: raise AnsibleError("Privilege escalation method not found: %s" % self.become_method) + |