Commit 259de978 authored by lifanov's avatar lifanov
Browse files

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
parent f4cdea80
......@@ -41,6 +41,7 @@
SUBDIR += ansible1
SUBDIR += ansible23
SUBDIR += ansible24
SUBDIR += ansible25
SUBDIR += anvil
SUBDIR += apachetop
SUBDIR += apcpwr
......
# $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
......
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
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)
......@@ -4,7 +4,7 @@ PKGNAMESUFFIX= 1
PORTVERSION= 1.9.6
PORTREVISION= 3
CONFLICTS= ansible-* ansible23-* ansible24-*
CONFLICTS= ansible-* ansible23-* ansible24-* ansible25-*
MASTERDIR= ${.CURDIR}/../ansible
DISTINFO_FILE= ${.CURDIR}/distinfo
......
......@@ -4,7 +4,7 @@ PORTVERSION= 2.3.3.0
PORTREVISION= 1
PKGNAMESUFFIX= 23
CONFLICTS= ansible-* ansible1-* ansible24-*
CONFLICTS= ansible-* ansible1-* ansible24-* ansible25-*
MASTERDIR= ${.CURDIR}/../ansible
DISTINFO_FILE= ${.CURDIR}/distinfo
......
......@@ -4,7 +4,7 @@ PORTVERSION= 2.4.4.0
PORTREVISION= 1
PKGNAMESUFFIX= 24
CONFLICTS= ansible-* ansible1-* ansible23-*
CONFLICTS= ansible-* ansible1-* ansible23-* ansible25-*
MASTERDIR= ${.CURDIR}/../ansible
DISTINFO_FILE= ${.CURDIR}/distinfo
......
# $FreeBSD$
PORTVERSION= 2.5.5
PORTREVISION= 0
PKGNAMESUFFIX= 25
CONFLICTS= ansible-* ansible1-* ansible23-* ansible24-*
MASTERDIR= ${.CURDIR}/../ansible
DISTINFO_FILE= ${.CURDIR}/distinfo
EXTRA_PATCHES=
.include "${MASTERDIR}/Makefile"
TIMESTAMP = 1530487374
SHA256 (ansible-2.5.5.tar.gz) = d7e5aae60c0e76c824bf8a410fe247b5c4afcfaee272f6283b4f996d237e365a
SIZE (ansible-2.5.5.tar.gz) = 10150862
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment