diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /app-admin/ansible/files | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'app-admin/ansible/files')
-rw-r--r-- | app-admin/ansible/files/README.gentoo | 8 | ||||
-rw-r--r-- | app-admin/ansible/files/ansible-ds-dns4.patch | 12 | ||||
-rw-r--r-- | app-admin/ansible/files/ansible-ds-gi.patch | 14 | ||||
-rw-r--r-- | app-admin/ansible/files/ansible-include-role.patch | 34 | ||||
-rw-r--r-- | app-admin/ansible/files/ansible.env | 2 |
5 files changed, 70 insertions, 0 deletions
diff --git a/app-admin/ansible/files/README.gentoo b/app-admin/ansible/files/README.gentoo new file mode 100644 index 0000000..828e13c --- /dev/null +++ b/app-admin/ansible/files/README.gentoo @@ -0,0 +1,8 @@ +You can define parameters through shell variables OR use config files +Examples of config files installed in /usr/share/ansible/examples +You have to create ansible hosts file! +More info on http://docs.ansible.com/intro_getting_started.html + +Some optional dependencies, you might want to install: +dev-python/keyczar - needed to support accelerated mode +dev-python/paramiko - alternative SSH backend" diff --git a/app-admin/ansible/files/ansible-ds-dns4.patch b/app-admin/ansible/files/ansible-ds-dns4.patch new file mode 100644 index 0000000..f18e7d8 --- /dev/null +++ b/app-admin/ansible/files/ansible-ds-dns4.patch @@ -0,0 +1,12 @@ +diff -dPNur ansible-2.4.3.0/lib/ansible/modules/net_tools/nmcli.py ansible-2.4.3.0-new/lib/ansible/modules/net_tools/nmcli.py +--- ansible-2.4.3.0/lib/ansible/modules/net_tools/nmcli.py 2018-02-01 00:09:48.000000000 +0100 ++++ ansible-2.4.3.0-new/lib/ansible/modules/net_tools/nmcli.py 2018-03-12 16:54:08.121892385 +0100 +@@ -556,7 +560,7 @@ + self.type=module.params['type'] + self.ip4=module.params['ip4'] + self.gw4=module.params['gw4'] +- self.dns4=' '.join(module.params['dns4']) ++ self.dns4=' '.join(module.params['dns4']) if module.params.get('dns4') else None + self.ip6=module.params['ip6'] + self.gw6=module.params['gw6'] + self.dns6=module.params['dns6'] diff --git a/app-admin/ansible/files/ansible-ds-gi.patch b/app-admin/ansible/files/ansible-ds-gi.patch new file mode 100644 index 0000000..2004e1a --- /dev/null +++ b/app-admin/ansible/files/ansible-ds-gi.patch @@ -0,0 +1,14 @@ +diff -dPNur ansible-2.4.3.0/lib/ansible/modules/net_tools/nmcli.py ansible-2.4.3.0-new/lib/ansible/modules/net_tools/nmcli.py +--- ansible-2.4.3.0/lib/ansible/modules/net_tools/nmcli.py 2018-02-01 00:09:48.000000000 +0100 ++++ ansible-2.4.3.0-new/lib/ansible/modules/net_tools/nmcli.py 2018-03-12 16:41:51.287447030 +0100 +@@ -490,6 +490,10 @@ + + HAVE_NM_CLIENT=False + try: ++ import gi ++ gi.require_version('NMClient', '1.0') ++ gi.require_version('NetworkManager', '1.0') ++ + from gi.repository import NetworkManager, NMClient + HAVE_NM_CLIENT=True + except ImportError: diff --git a/app-admin/ansible/files/ansible-include-role.patch b/app-admin/ansible/files/ansible-include-role.patch new file mode 100644 index 0000000..5ef7967 --- /dev/null +++ b/app-admin/ansible/files/ansible-include-role.patch @@ -0,0 +1,34 @@ +diff -dPNur ansible-2.4.3.0/lib/ansible/playbook/included_file.py ansible-2.4.3.0-new2/lib/ansible/playbook/included_file.py +--- ansible-2.4.3.0/lib/ansible/playbook/included_file.py 2018-02-01 00:09:48.000000000 +0100 ++++ ansible-2.4.3.0-new2/lib/ansible/playbook/included_file.py 2018-03-21 13:39:25.259172590 +0100 +@@ -134,6 +134,17 @@ + include_file = templar.template(include_file) + inc_file = IncludedFile(include_file, include_variables, original_task) + else: ++ # template the included role's name here ++ role_name = include_variables.get('name', include_variables.get('role', None)) ++ if role_name is not None: ++ role_name = templar.template(role_name) ++ ++ original_task._role_name = role_name ++ for from_arg in original_task.FROM_ARGS: ++ if from_arg in include_variables: ++ from_key = from_arg.replace('_from', '') ++ original_task._from_files[from_key] = templar.template(include_variables[from_arg]) ++ + inc_file = IncludedFile("role", include_variables, original_task, is_role=True) + + try: +diff -dPNur ansible-2.4.3.0/lib/ansible/plugins/strategy/free.py ansible-2.4.3.0-new2/lib/ansible/plugins/strategy/free.py +--- ansible-2.4.3.0/lib/ansible/plugins/strategy/free.py 2018-02-01 00:09:48.000000000 +0100 ++++ ansible-2.4.3.0-new2/lib/ansible/plugins/strategy/free.py 2018-03-21 13:39:25.259172590 +0100 +@@ -197,7 +197,7 @@ + new_ir = included_file._task.copy() + new_ir.vars.update(included_file._args) + +- new_blocks, handler_blocks = new_ir.get_block_list( ++ new_blocks, handler_blocks = included_file._task.get_block_list( + play=iterator._play, + variable_manager=self._variable_manager, + loader=self._loader, +diff -dPNur ansible-2.4.3.0/lib/ansible/plugins/strategy/free.py.orig ansible-2.4.3.0-new2/lib/ansible/plugins/strategy/free.py.orig diff --git a/app-admin/ansible/files/ansible.env b/app-admin/ansible/files/ansible.env new file mode 100644 index 0000000..9df5a2a --- /dev/null +++ b/app-admin/ansible/files/ansible.env @@ -0,0 +1,2 @@ +# Use ssh transport by default. Comment it out if you want to use paramiko +ANSIBLE_TRANSPORT="ssh" |