Link Here
|
|
|
1 |
--- lib/ansible/module_utils/facts/virtual/freebsd.py.orig 2018-10-25 02:45:26 UTC |
2 |
+++ lib/ansible/module_utils/facts/virtual/freebsd.py |
3 |
@@ -19,9 +19,10 @@ __metaclass__ = type |
4 |
import os |
5 |
|
6 |
from ansible.module_utils.facts.virtual.base import Virtual, VirtualCollector |
7 |
+from ansible.module_utils.facts.virtual.sysctl import VirtualSysctlDetectionMixin |
8 |
|
9 |
|
10 |
-class FreeBSDVirtual(Virtual): |
11 |
+class FreeBSDVirtual(Virtual, VirtualSysctlDetectionMixin): |
12 |
""" |
13 |
This is a FreeBSD-specific subclass of Virtual. It defines |
14 |
- virtualization_type |
15 |
@@ -35,6 +36,9 @@ class FreeBSDVirtual(Virtual): |
16 |
virtual_facts['virtualization_type'] = '' |
17 |
virtual_facts['virtualization_role'] = '' |
18 |
|
19 |
+ virtual_product_facts = self.detect_virt_product('hw.hv_vendor') |
20 |
+ virtual_facts.update(virtual_product_facts) |
21 |
+ |
22 |
if os.path.exists('/dev/xen/xenstore'): |
23 |
virtual_facts['virtualization_type'] = 'xen' |
24 |
virtual_facts['virtualization_role'] = 'guest' |
25 |
--- lib/ansible/modules/packaging/os/pkgng.py.orig 2018-10-24 02:17:26 UTC |
26 |
+++ lib/ansible/modules/packaging/os/pkgng.py |
27 |
@@ -201,13 +201,13 @@ def install_packages(module, pkgng_path, |
28 |
|
29 |
# This environment variable skips mid-install prompts, |
30 |
# setting them to their default values. |
31 |
- batch_var = 'env BATCH=yes' |
32 |
+ batch_var = 'env BATCH=yes ASSUME_ALWAYS_YES=yes' |
33 |
|
34 |
if not module.check_mode and not cached: |
35 |
if old_pkgng: |
36 |
- rc, out, err = module.run_command("%s %s update" % (pkgsite, pkgng_path)) |
37 |
+ rc, out, err = module.run_command("%s %s %s update" % (batch_var, pkgsite, pkgng_path)) |
38 |
else: |
39 |
- rc, out, err = module.run_command("%s %s update" % (pkgng_path, dir_arg)) |
40 |
+ rc, out, err = module.run_command("%s %s %s update" % (batch_var, pkgng_path, dir_arg)) |
41 |
if rc != 0: |
42 |
module.fail_json(msg="Could not update catalogue") |
43 |
|
44 |
--- lib/ansible/modules/storage/zfs/zfs.py.orig 2018-11-07 02:46:41 UTC |
45 |
+++ lib/ansible/modules/storage/zfs/zfs.py |
46 |
@@ -102,7 +102,7 @@ class Zfs(object): |
47 |
self.changed = False |
48 |
self.zfs_cmd = module.get_bin_path('zfs', True) |
49 |
self.zpool_cmd = module.get_bin_path('zpool', True) |
50 |
- self.pool = name.split('/')[0] |
51 |
+ self.pool = name.split('@')[0].split('/')[0] |
52 |
self.is_solaris = os.uname()[0] == 'SunOS' |
53 |
self.is_openzfs = self.check_openzfs() |
54 |
self.enhanced_sharing = self.check_enhanced_sharing() |
55 |
--- lib/ansible/playbook/play_context.py.orig 2018-10-10 00:56:07 UTC |
56 |
+++ lib/ansible/playbook/play_context.py |
57 |
@@ -528,8 +528,10 @@ class PlayContext(Base): |
58 |
becomecmd = cmd |
59 |
|
60 |
elif self.become_method == 'doas': |
61 |
+ def detect_doas_prompt(b_data): |
62 |
+ return re.match(b"[Pp]assword:", b_data) |
63 |
|
64 |
- prompt = 'doas (%s@' % self.remote_user |
65 |
+ prompt = detect_doas_prompt |
66 |
exe = self.become_exe or 'doas' |
67 |
|
68 |
if not self.become_pass: |