Re: [ansible-project] Problem use vmware_content_deploy_template:

2020-04-28 Thread Abhijeet Kasurde
Hi Nikita,

This seems to be an issue in the module. Could you please raise an issue
against - https://github.com/ansible-collections/vmware repo? also add your
vCenter version and Pyvmomi, vSphere Automation SDK version.

Thanks,

On Tue, Apr 28, 2020 at 10:37 PM nikita nipon <
antoniojimenezramire...@gmail.com> wrote:

> I have this playbook:
>
> ---
> - hosts: localhost
>   gather_facts: no
>   vars:
> vcenter_server:
> vcenter_user:
> vcenter_pass:
> datacenter_name:
> cluster_name:
> ansible_python_interpreter: "
>   tasks:
>   - name: Clone the template
> vmware_content_deploy_template:
>   hostname: '{{ vcenter_server }}'
>   host: pesxintra14.da.inf.sta
>   username: '{{ vcenter_user }}'
>   password: '{{ vcenter_pass }}'
>   validate_certs: False
>   name: testaes36
>   template: vmw-rhel-7
>   validate_certs: False
>   datacenter: '{{ datacenter_name }}'
>   folder: /{{ datacenter_name }}/vm
>   cluster: '{{ cluster_name }}'
>   datastore: VMAX2_LM_INTRA_DS_CLUSTER_01
>   state: poweredon
> delegate_to: localhost
>
> when i executed this playbook i have this error:
>
> The full traceback is:
> Traceback (most recent call last):
>   File
> "/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
> line 102, in 
> _ansiballz_main()
>   File
> "/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
> line 94, in _ansiballz_main
> invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
>   File
> "/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
> line 40, in invoke_module
>
> runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template',
> init_globals=None, run_name='__main__', alter_sys=True)
>   File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
> return _run_module_code(code, init_globals, run_name, mod_spec)
>   File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
> mod_name, mod_spec, pkg_name, script_name)
>   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
> exec(code, run_globals)
>   File
> "/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
> line 271, in 
>   File
> "/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
> line 267, in main
>   File
> "/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
> line 163, in deploy_vm_from_template
>   File
> "/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/module_utils/vmware_rest_client.py",
> line 274, in get_datacenter_by_name
>   File "/usr/lib/python3.6/site-packages/com/vmware/vcenter_client.py",
> line 636, in list
> 'filter': filter,
>   File "/usr/lib/python3.6/site-packages/vmware/vapi/bindings/stub.py",
> line 345, in _invoke
> return self._api_interface.native_invoke(ctx, _method_name, kwargs)
>   File "/usr/lib/python3.6/site-packages/vmware/vapi/bindings/stub.py",
> line 298, in native_invoke
> self._rest_converter_mode)
> com.vmware.vapi.std.errors_client.OperationNotFound: {messages :
> [LocalizableMessage(id='vapi.method.input.invalid.interface',
> default_message="Cannot find service 'com.vmware.vcenter.datacenter'.",
> args=['com.vmware.vcenter.datacenter'], params=None, localized=None)], data
> : None, error_type : None}
> fatal: [localhost -> localhost]: FAILED! => {
> "changed": false,
> "module_stderr": "Traceback (most recent call last):\n  File
> \"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
> line 102, in \n_ansiballz_main()\n  File
> \"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
> line 94, in _ansiballz_main\ninvoke_module(zipped_mod, temp_path,
> ANSIBALLZ_PARAMS)\n  File
> \"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
> line 40, in invoke_module\n
> runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template',
> init_globals=None, run_name='__main__', alter_sys=True)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\nreturn
> _run_module_code(code, init_globals, run_name, mod_spec)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n
> mod_name, mod_spec, pkg_name, script_name)\n  File
> \"/usr/lib64/python3.6/runpy.py\", line 85, in 

Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-28 Thread Quad Zero
Thank you so much!!! :)

On Thu, Apr 23, 2020 at 2:41 AM Jack Morgan  wrote:

> Hello,
>
> Based on the situation you define below, it sounds like you are wanting
> to add a custom yum repository to some hosts. Let's look at how you
> could go about doing it.
>
> (1) You will need to create a yum repository file on your hosts. This
> file will point to your custom repository on your Yum server. You can
> achieve that via ansible module(s) or just copy the yum repository file
> that you created to each host. You will need to do some research on how
> to do it. As others have pointed out, the yum module is a good place to
> start. I'm only offering two ways to achieve this step but there might
> be others strategies.
>
> (2) You will need to have ansible update your systems. I'm including
> part of my upgrade playbook below to use as a reference (I'm on fedora
> so using dnf instead of yum). You can have your hosts defined in your
> ansible hosts file (/etc/ansible/hosts). I'm not sure your strategy for
> organizing your hosts as there is a lot to say here but again some
> investigation is needed.
>
> Finally, you could combine step 1 and 2 into a single playbook to have
> them be two playbooks depending on your needs. I hope this is helpful.
>
> ---
>
> - hosts: fedora
>   tasks:
>   - name: UPDATE | upgrade packages
> dnf:
>   name: "*"
>   state: latest
>
>   - name: UPDATE | check if reboot is needed due to new kernel
> shell: if [ $(rpm -q kernel|tail -n 1) != kernel-$(uname -r) ]; then
> echo 'reboot'; else echo 'no'; fi
> register: reboot_hint
>
>   - name: UPDATE | rebooting host...
> shell: shutdown -r now "Reboot required for updated kernel"
> async: 1
> poll: 0
> when: reboot_hint.stdout.find("reboot") != -1
>
>   - name: UPDATE | wait for host to reboot...
> wait_for_connection:
>   connect_timeout: 20
>   sleep: 5
>   delay: 5
>   timeout: 300
> when: reboot_hint.stdout.find("reboot") != -1
>
>   - name: UPDATE | remove unused packages
> dnf:
>   autoremove: yes
>
>
>
>
> On 4/21/20 9:44 PM, Quad Zero wrote:
> > G'day all Ansible gurus,
> >
> > I am very new to Ansible and I am learning through youtube videos as I
> > am enquiring about this problem. It might be a simple one to some of
> > you guys:
> >
> > So I have multiple servers on my System. I have a VM by the name of
> > YUM which has all the updates (updates folder) on its /var/www/html
> > folder so it can be referenced from other systems if it was done
> > manually (which is what i have been doing until now).
> >
> > How do I specify this folder in Ansible to all other hosts?
> >
> > For eg:
> >
> > if my YUM server has all its updates in
> > http://192.168.0.5/rhel6pathes/april/
> >
> > how do i get the other servers to look at this location and update it
> > from here?
> >
> > Thank you so much.
>
> --
> Jack Morgan
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1ae55ac5-4443-bdb7-c72f-2831ba2a7434%40jento.io
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKr7FnvcKLsaRf%3DOu4TKB8ZgV%2BMPbU7cYP9isKfOJLSU_p39cg%40mail.gmail.com.


Re: [ansible-project] ansible letsencrypt

2020-04-28 Thread Stefan Hornburg (Racke)
On 4/29/20 6:23 AM, Sandy Hung wrote:
> Dear all:
> 
> I run ansible letsencrypt show error message please help me thanks.

Hello Sandy,

these aren't error messages. The tasks are skipped for some reason. Please 
provide complete output
of your playbook run.

Regards
Racke

> 
> TASK [ansible-letsencrypt : update the apt cache] 
> **
> task path: 
> /home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:2
> skipping: [localhost] => {
>     "changed": false,
>     "skip_reason": "Conditional result was False"
> }
> 
> TASK [ansible-letsencrypt : add certbot apt ppa repository] 
> 
> task path: 
> /home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:6
> skipping: [localhost] => {
>     "changed": false,
>     "skip_reason": "Conditional result was False"
> }
> 
> TASK [ansible-letsencrypt : install certbot ubuntu] 
> 
> task path: 
> /home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:11
> skipping: [localhost] => {
>     "changed": false,
>     "skip_reason": "Conditional result was False"
> }
> 
> 
> playbook
> 
> - name: update the apt cache
>   apt: update_cache=yes cache_valid_time=7200
>   become: yes
> 
> - name: add certbot apt ppa repository
>   apt_repository:
>     repo: "ppa:certbot/certbot"
>   become: yes
> 
> - name: install certbot ubuntu
>   apt: name=certbot state=latest
>   become: yes
> 
> - name: change the path to letsencrypt
>   set_fact:
>     letsencrypt_path: "/usr/bin/letsencrypt"
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4331257f-f908-4339-90f5-7890efb5e256%40googlegroups.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/15bfc218-07fb-0de0-ee6a-830fb538614b%40linuxia.de.


signature.asc
Description: OpenPGP digital signature


[ansible-project] Re: Problem connecting to Windows Server 2008R2 host

2020-04-28 Thread Martin Lucas
I did some Googling and found ansible_python_interpreter which I set 
to C:\Program\ Files\Python3.7.5. This removed the python not found warning 
and the output is now:

ansible -m ping 192.168.230.3 -vvv
ansible 2.8.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/cyborg/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 
20191008]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
META: ran handlers
Using module file 
/usr/lib/python3/dist-packages/ansible/modules/system/ping.py
Pipelining is enabled.
<192.168.230.3> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 
5986 TO 192.168.230.3
EXEC (via pipeline wrapper)
192.168.230.3 | FAILED! => {
"changed": false,
"module_stderr": "Exception calling \"Create\" with \"1\" argument(s): 
\"At line:4 char:21\r\n+ def _ansiballz_main():\r\n+
 ~\r\nAn expression was expected after '('.\r\nAt line:13 char:27\r\n+
 except (AttributeError, OSError):\r\n+  
 ~\r\nMissing argument in parameter list.\r\nAt line:15 char:7\r\n+ if 
scriptdir is not None:\r\n+   ~\r\nMissing '(' after 'if' in if 
statement.\r\nAt line:22 char:7\r\n+ if sys.version_info < (3,):\r\n+  
 ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:22 
char:30\r\n+ if sys.version_info < (3,):\r\n+  
~\r\nMissing expression after ','.\r\nAt line:22 char:25\r\n+ if 
sys.version_info < (3,):\r\n+ ~\r\nThe '<' operator 
is reserved for future use.\r\nAt line:24 char:32\r\n+ MOD_DESC = 
('.py', 'U', imp.PY_SOURCE)\r\n+
~\r\nMissing expression after ','.\r\nAt line:24 char:33\r\n+
 MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+
 ~\r\nUnexpected token 'imp.PY_SOURCE' in expression or 
statement.\r\nAt line:24 char:32\r\n+ MOD_DESC = ('.py', 'U', 
imp.PY_SOURCE)\r\n+~\r\nMissing closing ')' 
in expression.\r\nAt line:24 char:46\r\n+ MOD_DESC = ('.py', 'U', 
imp.PY_SOURCE)\r\n+  
~\r\nUnexpected token ')' in expression or statement.\r\nNot all parse 
errors were reported.  Correct the reported errors and try 
\r\nagain.\"\r\nAt line:6 char:1\r\n+ $exec_wrapper = 
[ScriptBlock]::Create($split_parts[0])\r\n+ 
~~\r\n+ 
CategoryInfo  : NotSpecified: (:) [], 
MethodInvocationException\r\n+ FullyQualifiedErrorId : 
ParseException\r\n \r\nThe expression after '&' in a pipeline element 
produced an object that was not \r\nvalid. It must result in a command 
name, a script block, or a CommandInfo \r\nobject.\r\nAt line:7 char:2\r\n+ 
&$exec_wrapper\r\n+  ~\r\n+ CategoryInfo  : 
InvalidOperation: (:) [], RuntimeException\r\n+ FullyQualifiedErrorId : 
BadExpression\r\n ",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}


On Wednesday, 29 April 2020 13:59:25 UTC+9:30, Martin Lucas wrote:
>
> Hi,
>
> I'm a first time Ansible user and have successfully tested connecting to 
> Linux hosts using the ping module :-). I'm having problems with doing the 
> same to a Windows Server 2008R2 host. I have followed the setup 
> instructions at 
> https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html and 
> that all worked OK. When I try and connect I get the following error.
>
> I seems like it can't find python, which is in C:\Program 
> Files\Python3.7.5 and in the path on the Windows box. 
>
> ansible -m ping 192.168.230.3 -vvv
> ansible 2.8.3
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = 
> ['/home/cyborg/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python3/dist-packages/ansible
>   executable location = /usr/bin/ansible
>   python version = 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 
> 20191008]
> Using /etc/ansible/ansible.cfg as config file
> host_list declined parsing /etc/ansible/hosts as it did not pass it's 
> verify_file() method
> script declined parsing /etc/ansible/hosts as it did not pass it's 
> verify_file() method
> auto declined parsing /etc/ansible/hosts as it did not pass it's 
> verify_file() method
> Parsed /etc/ansible/hosts inventory source with ini plugin
> META: 

[ansible-project] Problem connecting to Windows Server 2008R2 host

2020-04-28 Thread Martin Lucas
Hi,

I'm a first time Ansible user and have successfully tested connecting to 
Linux hosts using the ping module :-). I'm having problems with doing the 
same to a Windows Server 2008R2 host. I have followed the setup 
instructions at 
https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html and 
that all worked OK. When I try and connect I get the following error.

I seems like it can't find python, which is in C:\Program Files\Python3.7.5 
and in the path on the Windows box. 

ansible -m ping 192.168.230.3 -vvv
ansible 2.8.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/cyborg/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 
20191008]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it's 
verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
META: ran handlers
<192.168.230.3> Attempting python interpreter discovery
<192.168.230.3> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 
5986 TO 192.168.230.3
EXEC (via pipeline wrapper)
Using module file 
/usr/lib/python3/dist-packages/ansible/modules/system/ping.py
Pipelining is enabled.
EXEC (via pipeline wrapper)
* [WARNING]: No python interpreters found for host 192.168.230.3 (tried 
['/usr/bin/python', 'python3.7', 'python3.6',*
*'python3.5', 'python2.7', 'python2.6', '/usr/libexec/platform-python', 
'/usr/bin/python3', 'python'])*

192.168.230.3 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "Exception calling \"Create\" with \"1\" argument(s): 
\"At line:4 char:21\r\n+ def _ansiballz_main():\r\n+
 ~\r\nAn expression was expected after '('.\r\nAt line:13 char:27\r\n+
 except (AttributeError, OSError):\r\n+  
 ~\r\nMissing argument in parameter list.\r\nAt line:15 char:7\r\n+ if 
scriptdir is not None:\r\n+   ~\r\nMissing '(' after 'if' in if 
statement.\r\nAt line:22 char:7\r\n+ if sys.version_info < (3,):\r\n+  
 ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:22 
char:30\r\n+ if sys.version_info < (3,):\r\n+  
~\r\nMissing expression after ','.\r\nAt line:22 char:25\r\n+ if 
sys.version_info < (3,):\r\n+ ~\r\nThe '<' operator 
is reserved for future use.\r\nAt line:24 char:32\r\n+ MOD_DESC = 
('.py', 'U', imp.PY_SOURCE)\r\n+
~\r\nMissing expression after ','.\r\nAt line:24 char:33\r\n+
 MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+
 ~\r\nUnexpected token 'imp.PY_SOURCE' in expression or 
statement.\r\nAt line:24 char:32\r\n+ MOD_DESC = ('.py', 'U', 
imp.PY_SOURCE)\r\n+~\r\nMissing closing ')' 
in expression.\r\nAt line:24 char:46\r\n+ MOD_DESC = ('.py', 'U', 
imp.PY_SOURCE)\r\n+  
~\r\nUnexpected token ')' in expression or statement.\r\nNot all parse 
errors were reported.  Correct the reported errors and try 
\r\nagain.\"\r\nAt line:6 char:1\r\n+ $exec_wrapper = 
[ScriptBlock]::Create($split_parts[0])\r\n+ 
~~\r\n+ 
CategoryInfo  : NotSpecified: (:) [], 
MethodInvocationException\r\n+ FullyQualifiedErrorId : 
ParseException\r\n \r\nThe expression after '&' in a pipeline element 
produced an object that was not \r\nvalid. It must result in a command 
name, a script block, or a CommandInfo \r\nobject.\r\nAt line:7 char:2\r\n+ 
&$exec_wrapper\r\n+  ~\r\n+ CategoryInfo  : 
InvalidOperation: (:) [], RuntimeException\r\n+ FullyQualifiedErrorId : 
BadExpression\r\n ",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Does anyone have a solution to this?

Thanks,
Martin.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a8ca40e5-1444-44bd-bcf8-078fdf0e5415%40googlegroups.com.


[ansible-project] ansible letsencrypt

2020-04-28 Thread Sandy Hung
Dear all:

I run ansible letsencrypt show error message please help me thanks.

TASK [ansible-letsencrypt : update the apt cache] 
**
task path: 
/home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:2
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False"
}

TASK [ansible-letsencrypt : add certbot apt ppa repository] 

task path: 
/home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:6
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False"
}

TASK [ansible-letsencrypt : install certbot ubuntu] 

task path: 
/home/ldap/.ansible/roles/ansible-letsencrypt/tasks/ubuntu-xenial.yml:11
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False"
}


playbook

- name: update the apt cache
  apt: update_cache=yes cache_valid_time=7200
  become: yes

- name: add certbot apt ppa repository
  apt_repository:
repo: "ppa:certbot/certbot"
  become: yes

- name: install certbot ubuntu
  apt: name=certbot state=latest
  become: yes

- name: change the path to letsencrypt
  set_fact:
letsencrypt_path: "/usr/bin/letsencrypt"

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4331257f-f908-4339-90f5-7890efb5e256%40googlegroups.com.


Re: [ansible-project] define variables for multiple hosts in one file inside host_vars

2020-04-28 Thread Momodou Fatty
That's a nice suggestion and I agree it will solve the problem to an 
extent. 
I only showed a simple interface config here to keep things simple but the 
host specific configs is much more than just the mgmt em0 ip address. Let 
me give you a more realistic example:

10.10.10.10:
  hostname: hostname1
  data_nexthop: 100.12.1.7
  interfaces:
mgmt_interface:
  name: em0
  ip: 10.10.10.10
  subnet: 31
data_interface:
  name:  et-0/0/3
  ip: 100.12.1.6
  subnet: 31
  tor_name: seattle_router_01


See the data_interface is going to be different for each host, the 
data_interface's ip, next_hop and it's tor_name are all specific to each 
host. 

Would you recommend I put all of these host_specific values in host file 
then? I mean the /etc/ansible/hosts?

Creating a yaml file for each host under  /etc/ansible/host_vars will be a 
bit too much. 
--
Mo


On Tuesday, April 28, 2020 at 11:57:35 AM UTC-7, Dick Visser wrote:
>
> No.  You are mixing up groups and hosts (and probably the inventory as 
> well). 
> All variables under group_vars are meant to be specific to groups only 
> - not hosts. 
> Hosts specific variables go under their respective host_vars files. 
>
> Host and group specific variables can be set in the inventory, 
> group_vars, and host_vars. 
> Setting stuff in the inventory is usually done for very simple structures. 
> Given that your host specific data is already a nested dictionary, I 
> would not use the inventory for that. 
>
> Your example indicates that the entire 'interfaces' dictionary is, in 
> fact, not variable, it's the same for each host. You can add this to 
> the group_vars in this case: 
>
>   interfaces: 
> mgmt_interface: 
>   name: em0 
>   ip: "{{ ansible_hostname }}" 
>
>
>
> If your data is in fact different, please post a more accurate example. 
>
>
>
>
>
>
>
> On Tue, 28 Apr 2020 at 20:32, Momodou Fatty  > wrote: 
> > 
> > @Dick ... In fact, I have group_vars/all.yaml and in there I have stuff 
> like credentials and username/password, since this is common for all 
> devices 
> > I can create group_vars/eos_group.yaml and group_vars/junos_group.yaml. 
> However, this still does not solve the issue of having multiple variables 
> for the multiple hosts in the same file. 
> > 
> > Okay let's say I now have group_vars/junos_group.yaml. Inside this file 
> I have the defined variables for 10 different hosts. 
> > 10.10.10.10: 
> >   hostname: hostname1 
> >   data_nexthop: 10.10.10.1 
> >   interfaces: 
> > mgmt_interface: 
> >   name: em0 
> >   ip: 10.10.10.10: 
> > 12.12.12.12: 
> >   hostname: hostname2 
> >   data_nexthop: 12.12.12.1 
> >   interfaces: 
> > mgmt_interface: 
> >   name: em0 
> >   ip: 12.12.12.12 
> > 
> > In my playbook, I can reference value em0 with "{{ 
> group_vars[inventory_hostname]['interfaces']['mgmt_interface']['name'] }}" 
> > 
> > Is this correct? 
> > Thanks 
> > 
> > On Tuesday, April 28, 2020 at 10:26:39 AM UTC-7, Dick Visser wrote: 
> >> 
> >> First off, rename your groups to NOT have a hyphen. This is critical. 
> >> Then, use group_var/junos_group/ and define the common stuff below 
> there. 
> >> Same for the group_vars/eos_group/ 
> >> 
> >> it's all laid out in 
> >> https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html 
> >> 
> >> Dick 
> >> 
> >> 
> >> On Tue, 28 Apr 2020 at 19:16, Momodou Fatty  wrote: 
> >> > 
> >> > Let's say I have two groups of devices to configure, eos-group and 
> junos-group. 
> >> > 
> >> > Let's focus on junos-group. 
> >> > I have 10 devices in the junos-group. 
> >> > Each device will be configured with a mgmt ip, hostname, interface, 
> routes ...etc 
> >> > 
> >> > Inside of  /etc/ansible/host_vars/, I could create different files 
> for each host: hostname1.yaml, hostname2.yaml  
> >> > However, this doesn't. scale, does it? 
> >> > 
> >> > Can I just create one file (lets call it all_junos_hosts.yaml) inside 
> /etc/ansible/host_vars/, and inside of t his single file, I'll use 
> hierarchical structure to define variables for different hosts? 
> >> > E.g: my all_junos_hosts.yaml file will look like this: 
> >> > 
> >> > 10.10.10.10: 
> >> >   hostname: hostname1 
> >> >   data_nexthop: 10.10.10.1 
> >> >   interfaces: 
> >> > mgmt_interface: 
> >> >   name: em0 
> >> >   ip: 10.10.10.10: 
> >> > 12.12.12.12: 
> >> >   hostname: hostname2 
> >> >   data_nexthop: 12.12.12.1 
> >> >   interfaces: 
> >> > mgmt_interface: 
> >> >   name: em0 
> >> >   ip: 12.12.12.12 
> >> > 
> >> > I read somewhere that if I create a file called all_junos_hosts.yaml 
> inside of /etc/ansible/host_vars/, ansible will think there is a host 
> called all_junos_hosts.yaml. 
> >> > How do I get around this? 
> >> > 
> >> > Basically all I want to do is, in my template, I'll do something like 
> set interfaces management "{{ reference for mgmt interface for this host 
> }}" ... etc 
> >> > 
> >> > -- 
> >> > 

Re: [ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread Jordan Borean
The output shows a change occured and the file was templated. If the 
contents weren't what you were expecting then you need to fix the template 
or make sure you are checking the right server.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8529201d-3719-4550-9677-9fec0d41523d%40googlegroups.com.


Re: [ansible-project] Jinja template error while using with copy module

2020-04-28 Thread Vladimir Botka
On Tue, 28 Apr 2020 12:45:14 -0700 (PDT)
Suresh Karpurapu  wrote:

> - name: makeing file backup as vfstab.bkp in /tmp
>   copy: |-
> {% if ansible_os_family == "Solaris" %}
> src=/etc/vfstab dest=/tmp/vfstab.bkp remote_src=yes
> {%- else %}
> src=/etc/fstab dest=/tmp/fstab.bkp remote_src=yes
> {%- endif %}
>   when:
> - item.changed == true
> - item.stdout != ""
>   with_items: "{{ mounts.results }}"

Try this

 - name: making file backup as vfstab.bkp in /tmp
   copy:
 remote_src: true
 src: "{{ (ansible_os_family == 'Solaris')|
  ternary('/etc/vfstab', '/etc/fstab') }}"
 dest: "{{ (ansible_os_family == 'Solaris')|
   ternary('/tmp/vfstab.bkp', '/tmp/fstab.bkp') }}"
   loop: "{{ mounts.results }}"
   when:
 - item.changed|bool
 - item.stdout|length > 0

Why do you use the loop? The same copy shall be repeated when the
conditions are met? Wouldn't probably the tests "any" or "all" fit the
use-case better?
https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#test-if-a-list-contains-a-value

For example, copy backup if any result has been changed

  when: mounts.results|json_query('[].changed') is any

HTH,

-vlado

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200428221813.75cee2db%40gmail.com.


pgpxhTyxuVQpk.pgp
Description: OpenPGP digital signature


[ansible-project] Re: Jinja template error while using with copy module

2020-04-28 Thread Suresh Karpurapu
sorry guys, it worked for me in this way.

- name: makeing file backup as fstab.bkp in /tmp
copy: 
  src: |-
{% if ansible_os_family == "Solaris" %}
/etc/vfstab
{%- else %}
/etc/fstab
{%- endif %}
  dest: /tmp/fstab.bkp 
  remote_src: yes
when:
  - item.changed == true
  - item.stdout != ""
with_items: "{{ mounts.results }}"

On Wednesday, April 29, 2020 at 1:15:14 AM UTC+5:30, Suresh Karpurapu wrote:
>
> Hi All,
>
> I would like to use jinja templates for conditions instead when. Is there 
> anyways to fix the below errors with copy module?
>
> - name: makeing file backup as vfstab.bkp in /tmp
>   copy: |-
> {% if ansible_os_family == "Solaris" %}
> src=/etc/vfstab dest=/tmp/vfstab.bkp remote_src=yes
> {%- else %}
> src=/etc/fstab dest=/tmp/fstab.bkp remote_src=yes
> {%- endif %}
>   when:
> - item.changed == true
> - item.stdout != ""
>   with_items: "{{ mounts.results }}"
>
> Error Details:
> fatal: [ngzerpandb01-dev]: FAILED! => {
> "msg": "template error while templating string: Encountered unknown 
> tag 'else'.. String: {%- else %}\n{%- endif %}"
> }
> fatal: [vmwopsapp04-stg]: FAILED! => {
> "msg": "template error while templating string: Encountered unknown 
> tag 'else'.. String: {%- else %}\n{%- endif %}"
> }
> fatal: [vmwopsapp12-prd]: FAILED! => {
> "msg": "template error while templating string: Encountered unknown 
> tag 'else'.. String: {%- else %}\n{%- endif %}"
> }
>
>
> Regards,
> Suresh
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/737ed776-6568-4e31-9994-01edc338eac0%40googlegroups.com.


[ansible-project] Jinja template error while using with copy module

2020-04-28 Thread Suresh Karpurapu
Hi All,

I would like to use jinja templates for conditions instead when. Is there 
anyways to fix the below errors with copy module?

- name: makeing file backup as vfstab.bkp in /tmp
  copy: |-
{% if ansible_os_family == "Solaris" %}
src=/etc/vfstab dest=/tmp/vfstab.bkp remote_src=yes
{%- else %}
src=/etc/fstab dest=/tmp/fstab.bkp remote_src=yes
{%- endif %}
  when:
- item.changed == true
- item.stdout != ""
  with_items: "{{ mounts.results }}"

Error Details:
fatal: [ngzerpandb01-dev]: FAILED! => {
"msg": "template error while templating string: Encountered unknown tag 
'else'.. String: {%- else %}\n{%- endif %}"
}
fatal: [vmwopsapp04-stg]: FAILED! => {
"msg": "template error while templating string: Encountered unknown tag 
'else'.. String: {%- else %}\n{%- endif %}"
}
fatal: [vmwopsapp12-prd]: FAILED! => {
"msg": "template error while templating string: Encountered unknown tag 
'else'.. String: {%- else %}\n{%- endif %}"
}


Regards,
Suresh

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d39bb1ee-3ae6-4a79-8004-ae9c8e8c861f%40googlegroups.com.


Re: [ansible-project] get name of network adapter

2020-04-28 Thread Dick Visser
On Tue, 28 Apr 2020 at 19:33, nikita nipon
 wrote:
>
> I need to know the name of the network adapter. Since sometimes it is eth0 
> and other times ens192 for vwmare and rhev machines is it possible?

You need to be more specific. What do you mean by "the" network
adapter? Which one?


-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwMQ_7WOKyaFn-_osknz8T5jHv%2B6sP%2B6C-Q6ThB-fhn%3DeA%40mail.gmail.com.


Re: [ansible-project] define variables for multiple hosts in one file inside host_vars

2020-04-28 Thread Dick Visser
No.  You are mixing up groups and hosts (and probably the inventory as well).
All variables under group_vars are meant to be specific to groups only
- not hosts.
Hosts specific variables go under their respective host_vars files.

Host and group specific variables can be set in the inventory,
group_vars, and host_vars.
Setting stuff in the inventory is usually done for very simple structures.
Given that your host specific data is already a nested dictionary, I
would not use the inventory for that.

Your example indicates that the entire 'interfaces' dictionary is, in
fact, not variable, it's the same for each host. You can add this to
the group_vars in this case:

  interfaces:
mgmt_interface:
  name: em0
  ip: "{{ ansible_hostname }}"



If your data is in fact different, please post a more accurate example.







On Tue, 28 Apr 2020 at 20:32, Momodou Fatty  wrote:
>
> @Dick ... In fact, I have group_vars/all.yaml and in there I have stuff like 
> credentials and username/password, since this is common for all devices
> I can create group_vars/eos_group.yaml and group_vars/junos_group.yaml. 
> However, this still does not solve the issue of having multiple variables for 
> the multiple hosts in the same file.
>
> Okay let's say I now have group_vars/junos_group.yaml. Inside this file I 
> have the defined variables for 10 different hosts.
> 10.10.10.10:
>   hostname: hostname1
>   data_nexthop: 10.10.10.1
>   interfaces:
> mgmt_interface:
>   name: em0
>   ip: 10.10.10.10:
> 12.12.12.12:
>   hostname: hostname2
>   data_nexthop: 12.12.12.1
>   interfaces:
> mgmt_interface:
>   name: em0
>   ip: 12.12.12.12
>
> In my playbook, I can reference value em0 with "{{ 
> group_vars[inventory_hostname]['interfaces']['mgmt_interface']['name'] }}"
>
> Is this correct?
> Thanks
>
> On Tuesday, April 28, 2020 at 10:26:39 AM UTC-7, Dick Visser wrote:
>>
>> First off, rename your groups to NOT have a hyphen. This is critical.
>> Then, use group_var/junos_group/ and define the common stuff below there.
>> Same for the group_vars/eos_group/
>>
>> it's all laid out in
>> https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
>>
>> Dick
>>
>>
>> On Tue, 28 Apr 2020 at 19:16, Momodou Fatty  wrote:
>> >
>> > Let's say I have two groups of devices to configure, eos-group and 
>> > junos-group.
>> >
>> > Let's focus on junos-group.
>> > I have 10 devices in the junos-group.
>> > Each device will be configured with a mgmt ip, hostname, interface, routes 
>> > ...etc
>> >
>> > Inside of  /etc/ansible/host_vars/, I could create different files for 
>> > each host: hostname1.yaml, hostname2.yaml 
>> > However, this doesn't. scale, does it?
>> >
>> > Can I just create one file (lets call it all_junos_hosts.yaml) inside 
>> > /etc/ansible/host_vars/, and inside of t his single file, I'll use 
>> > hierarchical structure to define variables for different hosts?
>> > E.g: my all_junos_hosts.yaml file will look like this:
>> >
>> > 10.10.10.10:
>> >   hostname: hostname1
>> >   data_nexthop: 10.10.10.1
>> >   interfaces:
>> > mgmt_interface:
>> >   name: em0
>> >   ip: 10.10.10.10:
>> > 12.12.12.12:
>> >   hostname: hostname2
>> >   data_nexthop: 12.12.12.1
>> >   interfaces:
>> > mgmt_interface:
>> >   name: em0
>> >   ip: 12.12.12.12
>> >
>> > I read somewhere that if I create a file called all_junos_hosts.yaml 
>> > inside of /etc/ansible/host_vars/, ansible will think there is a host 
>> > called all_junos_hosts.yaml.
>> > How do I get around this?
>> >
>> > Basically all I want to do is, in my template, I'll do something like set 
>> > interfaces management "{{ reference for mgmt interface for this host }}" 
>> > ... etc
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Ansible Project" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to ansible...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/ansible-project/853a412c-2b95-4e99-94bf-3da30badb559%40googlegroups.com.
>>
>>
>>
>> --
>> Dick Visser
>> Trust & Identity Service Operations Manager
>> GÉANT
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/2b131d1e-c292-4cb4-a71e-8d03578d9b77%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: [ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread Stefan Hornburg (Racke)
On 4/28/20 8:10 PM, shyam rpm wrote:
> Hi, 
> 
> Im using Ansible tower and j2 file and playbook are in GitHub, can you please 
> check the attached log,
> 
> Thank you,
> shyam

Ansible tower is not a subject of this list, only Ansible itself.
Please contact RedHat support.

Regards
Racke

> 
> 
> Virus-free. www.avast.com
> 
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> 
> On Tue, Apr 28, 2020 at 8:03 PM Dick Visser  > wrote:
> 
> Please post a full debug log using -vvv 
> 
> On Tue, 28 Apr 2020 at 16:04, shyam rpm  > wrote:
> 
> Hi Jordan, 
> 
> I have tried the suggested code but still have the same issue and it 
> is not creating the file or updating the
> file content.
> 
> - win_template:
>    src: config.j2
>     dest: D:\config1.json  
> 
> 
> Thanks and Regards,
> Shyam
> 
> On Tue, Apr 28, 2020 at 2:52 PM Jordan Borean  > wrote:
> 
> Remove remote_src: true as it's expecting you to supply src for 
> the copy. Better yet use win_template
> instead like
> 
> |
> -win_template:
>    src:config.j2
>     dest:D:\config1.json
> |
> 
> 
> -- 
> You received this message because you are subscribed to the 
> Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, 
> send an email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> 
> https://groups.google.com/d/msgid/ansible-project/8c3816e3-703c-490a-a591-ed7256bf0c59%40googlegroups.com
> 
> .
> 
> -- 
> You received this message because you are subscribed to the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, 
> send an email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> 
> https://groups.google.com/d/msgid/ansible-project/CAFXETnrs6%2B8%2B%2BiRLiL3%3DCZNfh7smjFM%3DGmca%3D5PgaP81pfhSNw%40mail.gmail.com
> 
> .
> 
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> 
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwO9RkgyEyFS95kXfpV5jfgjGk_iJXEz1yujYCJCHY0hNg%40mail.gmail.com
> 
> .
> 
> 
> 
> Virus-free. www.avast.com
> 
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFXETnpsKs4R_bQMTcBkH-mDRGCSBqatbu_tSNFYqJ1V%3DLeCWA%40mail.gmail.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: [ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread Dick Visser
I see a photograph of a screen that displays a non verbose playbook run
without any useful information.

Please contact Redhat for support with Tower.



On Tue, 28 Apr 2020 at 20:10, shyam rpm  wrote:

> Hi,
>
> Im using Ansible tower and j2 file and playbook are in GitHub, can you
> please check the attached log,
>
> Thank you,
> shyam
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_274150969763891717_m_-5275737097204689321_m_-8074116036195306337_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Tue, Apr 28, 2020 at 8:03 PM Dick Visser  wrote:
>
>> Please post a full debug log using -vvv
>>
>> On Tue, 28 Apr 2020 at 16:04, shyam rpm  wrote:
>>
>>> Hi Jordan,
>>>
>>> I have tried the suggested code but still have the same issue and it is
>>> not creating the file or updating the file content.
>>>
>>> - win_template:
>>>src: config.j2
>>> dest: D:\config1.json
>>>
>>>
>>> Thanks and Regards,
>>> Shyam
>>>
>>> On Tue, Apr 28, 2020 at 2:52 PM Jordan Borean 
>>> wrote:
>>>
 Remove remote_src: true as it's expecting you to supply src for the
 copy. Better yet use win_template instead like

 - win_template:
src: config.j2
 dest: D:\config1.json


 --
 You received this message because you are subscribed to the Google
 Groups "Ansible Project" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to ansible-project+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/8c3816e3-703c-490a-a591-ed7256bf0c59%40googlegroups.com
 
 .

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ansible-project+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAFXETnrs6%2B8%2B%2BiRLiL3%3DCZNfh7smjFM%3DGmca%3D5PgaP81pfhSNw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> Sent from a mobile device - please excuse the brevity, spelling and
>> punctuation.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ansible-project+unsubscr...@googlegroups.com.
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAL8fbwO9RkgyEyFS95kXfpV5jfgjGk_iJXEz1yujYCJCHY0hNg%40mail.gmail.com
>> 
>> .
>>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_274150969763891717_m_-5275737097204689321_m_-8074116036195306337_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFXETnpsKs4R_bQMTcBkH-mDRGCSBqatbu_tSNFYqJ1V%3DLeCWA%40mail.gmail.com
> 
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwOQ7DLA4LQEAGxmOWqd5rFrhXrEDo9uckEo7TD1GZbYnA%40mail.gmail.com.


Re: [ansible-project] error installing nginx

2020-04-28 Thread Stefan Hornburg (Racke)
On 4/28/20 8:09 PM, Tony Wong wrote:
> Screen Shot 2020-04-28 at 10.53.46 AM.png
> 
> 
> 
> any idea?
> 
Well, I can read the error message and draw the proper conclusions ... your 
indentation is wrong.

Regards
 Racke
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9e4ec8ee-eea3-42ff-a92a-9d956c657749%40googlegroups.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/28a2e4bb-cf40-a7b9-1a36-04e7220a129b%40linuxia.de.


signature.asc
Description: OpenPGP digital signature


Re: [ansible-project] define variables for multiple hosts in one file inside host_vars

2020-04-28 Thread Momodou Fatty
@Dick ... In fact, I have group_vars/all.yaml and in there I have stuff 
like credentials and username/password, since this is common for all devices
I can create group_vars/eos_group.yaml and group_vars/junos_group.yaml. 
However, this still does not solve the issue of having multiple variables 
for the multiple hosts in the same file. 

Okay let's say I now have *group_vars/junos_group.yaml*. Inside this file I 
have the defined variables for 10 different hosts.
10.10.10.10:
  hostname: hostname1
  data_nexthop: 10.10.10.1
  interfaces:
mgmt_interface:
  name: em0
  ip: 10.10.10.10:
12.12.12.12:
  hostname: hostname2
  data_nexthop: 12.12.12.1
  interfaces:
mgmt_interface:
  name: *em0*
  ip: 12.12.12.12

In my playbook, I can reference value *em0* with "{{ 
group_vars[inventory_hostname]['interfaces']['mgmt_interface']['name'] }}"

Is this correct?
Thanks

On Tuesday, April 28, 2020 at 10:26:39 AM UTC-7, Dick Visser wrote:
>
> First off, rename your groups to NOT have a hyphen. This is critical. 
> Then, use group_var/junos_group/ and define the common stuff below there. 
> Same for the group_vars/eos_group/ 
>
> it's all laid out in 
> https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html 
>
> Dick 
>
>
> On Tue, 28 Apr 2020 at 19:16, Momodou Fatty  > wrote: 
> > 
> > Let's say I have two groups of devices to configure, eos-group and 
> junos-group. 
> > 
> > Let's focus on junos-group. 
> > I have 10 devices in the junos-group. 
> > Each device will be configured with a mgmt ip, hostname, interface, 
> routes ...etc 
> > 
> > Inside of  /etc/ansible/host_vars/, I could create different files for 
> each host: hostname1.yaml, hostname2.yaml  
> > However, this doesn't. scale, does it? 
> > 
> > Can I just create one file (lets call it all_junos_hosts.yaml) inside 
> /etc/ansible/host_vars/, and inside of t his single file, I'll use 
> hierarchical structure to define variables for different hosts? 
> > E.g: my all_junos_hosts.yaml file will look like this: 
> > 
> > 10.10.10.10: 
> >   hostname: hostname1 
> >   data_nexthop: 10.10.10.1 
> >   interfaces: 
> > mgmt_interface: 
> >   name: em0 
> >   ip: 10.10.10.10: 
> > 12.12.12.12: 
> >   hostname: hostname2 
> >   data_nexthop: 12.12.12.1 
> >   interfaces: 
> > mgmt_interface: 
> >   name: em0 
> >   ip: 12.12.12.12 
> > 
> > I read somewhere that if I create a file called all_junos_hosts.yaml 
> inside of /etc/ansible/host_vars/, ansible will think there is a host 
> called all_junos_hosts.yaml. 
> > How do I get around this? 
> > 
> > Basically all I want to do is, in my template, I'll do something like 
> set interfaces management "{{ reference for mgmt interface for this host 
> }}" ... etc 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Ansible Project" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to ansible...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/853a412c-2b95-4e99-94bf-3da30badb559%40googlegroups.com.
>  
>
>
>
>
> -- 
> Dick Visser 
> Trust & Identity Service Operations Manager 
> GÉANT 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2b131d1e-c292-4cb4-a71e-8d03578d9b77%40googlegroups.com.


[ansible-project] error installing nginx

2020-04-28 Thread Tony Wong


[image: Screen Shot 2020-04-28 at 10.53.46 AM.png]


any idea?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e4ec8ee-eea3-42ff-a92a-9d956c657749%40googlegroups.com.


[ansible-project] get name of network adapter

2020-04-28 Thread nikita nipon
I need to know the name of the network adapter. Since sometimes it is eth0 
and other times ens192 for vwmare and rhev machines is it possible?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8efcd63c-9b69-440f-bf5e-9a328f9cbc28%40googlegroups.com.


Re: [ansible-project] define variables for multiple hosts in one file inside host_vars

2020-04-28 Thread Dick Visser
First off, rename your groups to NOT have a hyphen. This is critical.
Then, use group_var/junos_group/ and define the common stuff below there.
Same for the group_vars/eos_group/

it's all laid out in
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html

Dick


On Tue, 28 Apr 2020 at 19:16, Momodou Fatty  wrote:
>
> Let's say I have two groups of devices to configure, eos-group and 
> junos-group.
>
> Let's focus on junos-group.
> I have 10 devices in the junos-group.
> Each device will be configured with a mgmt ip, hostname, interface, routes 
> ...etc
>
> Inside of  /etc/ansible/host_vars/, I could create different files for each 
> host: hostname1.yaml, hostname2.yaml 
> However, this doesn't. scale, does it?
>
> Can I just create one file (lets call it all_junos_hosts.yaml) inside 
> /etc/ansible/host_vars/, and inside of t his single file, I'll use 
> hierarchical structure to define variables for different hosts?
> E.g: my all_junos_hosts.yaml file will look like this:
>
> 10.10.10.10:
>   hostname: hostname1
>   data_nexthop: 10.10.10.1
>   interfaces:
> mgmt_interface:
>   name: em0
>   ip: 10.10.10.10:
> 12.12.12.12:
>   hostname: hostname2
>   data_nexthop: 12.12.12.1
>   interfaces:
> mgmt_interface:
>   name: em0
>   ip: 12.12.12.12
>
> I read somewhere that if I create a file called all_junos_hosts.yaml inside 
> of /etc/ansible/host_vars/, ansible will think there is a host called 
> all_junos_hosts.yaml.
> How do I get around this?
>
> Basically all I want to do is, in my template, I'll do something like set 
> interfaces management "{{ reference for mgmt interface for this host }}" ... 
> etc
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/853a412c-2b95-4e99-94bf-3da30badb559%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNjYC5XAE4T54-uPzVbXP7oXeTLESgFibw7hh%3DRR6BB_w%40mail.gmail.com.


[ansible-project] define variables for multiple hosts in one file inside host_vars

2020-04-28 Thread Momodou Fatty
Let's say I have two groups of devices to configure, eos-group and 
junos-group.

Let's focus on junos-group. 
I have 10 devices in the junos-group. 
Each device will be configured with a mgmt ip, hostname, interface, routes 
...etc

Inside of  /etc/ansible/host_vars/, I could create different files for each 
host: hostname1.yaml, hostname2.yaml 
However, this doesn't. scale, does it? 

Can I just create one file (lets call it all_junos_hosts.yaml) inside 
/etc/ansible/host_vars/, and inside of t his single file, I'll use 
hierarchical structure to define variables for different hosts?
E.g: my *all_junos_hosts.yaml* file will look like this:

10.10.10.10:
  hostname: hostname1
  data_nexthop: 10.10.10.1
  interfaces:
mgmt_interface:
  name: em0
  ip: 10.10.10.10:
12.12.12.12:
  hostname: hostname2
  data_nexthop: 12.12.12.1
  interfaces:
mgmt_interface:
  name: em0
  ip: 12.12.12.12

I read somewhere that if I create a file called all_junos_hosts.yaml inside 
of /etc/ansible/host_vars/, ansible will think there is a host called 
all_junos_hosts.yaml. 
How do I get around this?

Basically all I want to do is, in my template, I'll do something like *set 
interfaces management "{{ reference for mgmt interface for this host }}*" 
... etc

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/853a412c-2b95-4e99-94bf-3da30badb559%40googlegroups.com.


[ansible-project] Problem use vmware_content_deploy_template:

2020-04-28 Thread nikita nipon
I have this playbook:

---
- hosts: localhost
  gather_facts: no
  vars:
vcenter_server: 
vcenter_user: 
vcenter_pass: 
datacenter_name: 
cluster_name: 
ansible_python_interpreter: "
  tasks:
  - name: Clone the template
vmware_content_deploy_template:
  hostname: '{{ vcenter_server }}'
  host: pesxintra14.da.inf.sta
  username: '{{ vcenter_user }}'
  password: '{{ vcenter_pass }}'
  validate_certs: False
  name: testaes36
  template: vmw-rhel-7
  validate_certs: False
  datacenter: '{{ datacenter_name }}'
  folder: /{{ datacenter_name }}/vm
  cluster: '{{ cluster_name }}'
  datastore: VMAX2_LM_INTRA_DS_CLUSTER_01
  state: poweredon
delegate_to: localhost

when i executed this playbook i have this error:

The full traceback is:
Traceback (most recent call last):
  File 
"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
 
line 102, in 
_ansiballz_main()
  File 
"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
 
line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py",
 
line 40, in invoke_module

runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template',
 
init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File 
"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
 
line 271, in 
  File 
"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
 
line 267, in main
  File 
"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py",
 
line 163, in deploy_vm_from_template
  File 
"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/module_utils/vmware_rest_client.py",
 
line 274, in get_datacenter_by_name
  File "/usr/lib/python3.6/site-packages/com/vmware/vcenter_client.py", 
line 636, in list
'filter': filter,
  File "/usr/lib/python3.6/site-packages/vmware/vapi/bindings/stub.py", 
line 345, in _invoke
return self._api_interface.native_invoke(ctx, _method_name, kwargs)
  File "/usr/lib/python3.6/site-packages/vmware/vapi/bindings/stub.py", 
line 298, in native_invoke
self._rest_converter_mode)
com.vmware.vapi.std.errors_client.OperationNotFound: {messages : 
[LocalizableMessage(id='vapi.method.input.invalid.interface', 
default_message="Cannot find service 'com.vmware.vcenter.datacenter'.", 
args=['com.vmware.vcenter.datacenter'], params=None, localized=None)], data 
: None, error_type : None}
fatal: [localhost -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n  File 
\"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
 
line 102, in \n_ansiballz_main()\n  File 
\"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
 
line 94, in _ansiballz_main\ninvoke_module(zipped_mod, temp_path, 
ANSIBALLZ_PARAMS)\n  File 
\"/root/.ansible/tmp/ansible-tmp-1588091260.39-16412-32997630688977/AnsiballZ_vmware_content_deploy_template.py\",
 
line 40, in invoke_module\n
runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template',
 
init_globals=None, run_name='__main__', alter_sys=True)\n  File 
\"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\nreturn 
_run_module_code(code, init_globals, run_name, mod_spec)\n  File 
\"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n
mod_name, mod_spec, pkg_name, script_name)\n  File 
\"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\nexec(code, 
run_globals)\n  File 
\"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\",
 
line 271, in \n  File 
\"/tmp/ansible_vmware_content_deploy_template_payload_j4th38xk/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\",
 
line 267, in main\n  

Re: [ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2020-04-28 Thread mayape mayape
Seems like there is a bug. If commenting the line "from 
ansible.module_utils.basic import get_timestamp" in 
"ansible/plugins/cliconf/frr.py" it works.



On Monday, April 27, 2020 at 1:40:35 PM UTC+3, mayape mayape wrote:
>
> Hi,
> Thanks for the quick response. 
>
> Fixed the warning, but now getting another:
>
>
> root@maya-VirtualBox:/home/maya/ansible# ansible-playbook demo.yml -i 
> hosts -
> ansible-playbook 2.9.7
>   config file = /home/maya/ansible/ansible.cfg
>   configured module search path = ['/root/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = 
> /usr/local/lib/python3.6/dist-packages/ansible
>   executable location = /usr/local/bin/ansible-playbook
>   python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
> Using /home/maya/ansible/ansible.cfg as config file
> setting up inventory plugins
> host_list declined parsing /home/maya/ansible/hosts as it did not pass its 
> verify_file() method
> script declined parsing /home/maya/ansible/hosts as it did not pass its 
> verify_file() method
> auto declined parsing /home/maya/ansible/hosts as it did not pass its 
> verify_file() method
> Set default localhost to localhost
> Parsed /home/maya/ansible/hosts inventory source with ini plugin
> Loading callback plugin default of type stdout, v2.0 from 
> /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/default.py
>
> PLAYBOOK: demo.yml 
> ***
> Positional arguments: demo.yml
> verbosity: 4
> connection: smart
> timeout: 10
> become_method: sudo
> tags: ('all',)
> inventory: ('/home/maya/ansible/hosts',)
> forks: 5
> 1 plays in demo.yml
>
> PLAY [frr] 
> ***
> META: ran handlers
>
> TASK [get facts of router] 
> ***
> task path: /home/maya/ansible/demo.yml:5
> The full traceback is:
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python3.6/dist-packages/ansible/executor/task_executor.py", 
> line 146, in run
> res = self._execute()
>   File 
> "/usr/local/lib/python3.6/dist-packages/ansible/executor/task_executor.py", 
> line 601, in _execute
> self._connection = self._get_connection(variables=variables, 
> templar=templar)
>   File 
> "/usr/local/lib/python3.6/dist-packages/ansible/executor/task_executor.py", 
> line 895, in _get_connection
> ansible_playbook_pid=to_text(os.getppid())
>   File "/usr/local/lib/python3.6/dist-packages/ansible/plugins/loader.py", 
> line 578, in get
> obj = obj(*args, **kwargs)
>   File 
> "/usr/local/lib/python3.6/dist-packages/ansible/plugins/connection/network_cli.py",
>  
> line 331, in __init__
> self.cliconf = cliconf_loader.get(self._network_os, self)
>   File "/usr/local/lib/python3.6/dist-packages/ansible/plugins/loader.py", 
> line 557, in get
> self._module_cache[path] = self._load_module_source(name, path)
>   File "/usr/local/lib/python3.6/dist-packages/ansible/plugins/loader.py", 
> line 530, in _load_module_source
> spec.loader.exec_module(module)
>   File "", line 678, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File 
> "/usr/local/lib/python3.6/dist-packages/ansible/plugins/cliconf/frr.py", 
> line 41, in 
> from ansible.module_utils.basic import get_timestamp
> ImportError: cannot import name 'get_timestamp'
> fatal: [cumulus01]: FAILED! => {
> "msg": "Unexpected failure during module execution.",
> "stdout": ""
> }
>
> PLAY RECAP 
> ***
> cumulus01  : ok=0changed=0unreachable=0
> failed=1skipped=0rescued=0ignored=0
>
> root@maya-VirtualBox:/home/maya/ansible#
>
>
> Thanks,
> Maya
>
>
> On Monday, April 27, 2020 at 12:36:47 PM UTC+3, Stefan Hornburg (Racke) 
> wrote:
>>
>> On 4/27/20 11:33 AM, mayape mayape wrote: 
>> > Hi all, 
>> > I'm having the same problem. Tried everything suggested here, but no 
>> luck... 
>> > 
>>
>> What about fixing all the inventory warnings first? 
>>
>> Regards 
>>  Racke 
>>
>> > This is the error message I keep receiving: 
>> > 
>> >  ansible-playbook 2.9.7 
>> >   config file = /home/maya/ansible/ansible.cfg 
>> >   configured module search path = ['/root/.ansible/plugins/modules', 
>> '/usr/share/ansible/plugins/modules'] 
>> >   ansible python module location = 
>> 

Re: [ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread Dick Visser
Please post a full debug log using -vvv

On Tue, 28 Apr 2020 at 16:04, shyam rpm  wrote:

> Hi Jordan,
>
> I have tried the suggested code but still have the same issue and it is
> not creating the file or updating the file content.
>
> - win_template:
>src: config.j2
> dest: D:\config1.json
>
>
> Thanks and Regards,
> Shyam
>
> On Tue, Apr 28, 2020 at 2:52 PM Jordan Borean  wrote:
>
>> Remove remote_src: true as it's expecting you to supply src for the copy.
>> Better yet use win_template instead like
>>
>> - win_template:
>>src: config.j2
>> dest: D:\config1.json
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/8c3816e3-703c-490a-a591-ed7256bf0c59%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFXETnrs6%2B8%2B%2BiRLiL3%3DCZNfh7smjFM%3DGmca%3D5PgaP81pfhSNw%40mail.gmail.com
> 
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwO9RkgyEyFS95kXfpV5jfgjGk_iJXEz1yujYCJCHY0hNg%40mail.gmail.com.


Re: [ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread shyam rpm
Hi Jordan,

I have tried the suggested code but still have the same issue and it is not
creating the file or updating the file content.

- win_template:
   src: config.j2
dest: D:\config1.json


Thanks and Regards,
Shyam

On Tue, Apr 28, 2020 at 2:52 PM Jordan Borean  wrote:

> Remove remote_src: true as it's expecting you to supply src for the copy.
> Better yet use win_template instead like
>
> - win_template:
>src: config.j2
> dest: D:\config1.json
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8c3816e3-703c-490a-a591-ed7256bf0c59%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFXETnrs6%2B8%2B%2BiRLiL3%3DCZNfh7smjFM%3DGmca%3D5PgaP81pfhSNw%40mail.gmail.com.


Re: [ansible-project] ERROR: Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips

2020-04-28 Thread Jorge Rúa
Haven't looked too much into it, but are you aware of limitations of
running in a FIPS enabled mode?

Can you provide us with a sample playbook (please remove access tokens,
credentials, private keys, passwords, etc)

Thanks

El mar., 28 abr. 2020 a las 11:14, Parasuram A Havoji ()
escribió:

> Hello,
>
> I am seeing the below error while running playbook, i ran playbook with
> debug enabled and with increased verbose level but not sure of the root
> cuase of failure. Can someone please help me find the issue; thank you
>
> Below is my configuration;
>
> Ansible Master node;
> 
> # ansible --version
> ansible 2.9.2
>   config file = /root/galorndon-infra/playbooks/ansible.cfg
>   configured module search path = ['/root/.ansible/plugins/modules',
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = /py36env/lib64/python3.6/site-packages/
> ansible
>   executable location = /py36env/bin/ansible
>   python version = 3.6.8 (default, Aug  7 2019, 08:02:28) [GCC 4.8.5
> 20150623 (Red Hat 4.8.5-39.0.1)]
> #
> # rpm -qa |grep openssh
> openssh-7.4p1-21.el7.x86_64
> openssh-clients-7.4p1-21.el7.x86_64
> #
>
>
>
>
> Managed node;
> =
> [root@vault1 ~]# python --version
> Python 2.7.5
> [root@vault1 ~]#
> [root@vault1 ~]#
> [root@vault1 ~]# rpm -qa |grep openssh
> openssh-7.4p1-21.el7.x86_64
> openssh-clients-7.4p1-21.el7.x86_64
> openssh-server-7.4p1-21.el7.x86_64
> [root@vault1 ~]#
> [root@vault1 ~]#
>
>
> Playbook error ;
> 
>
> TASK [vault : Configure Kubernetes Auth for ControlPlane]
> *
> task path:
> /root/galorndon-infra/playbooks/roles/vault/tasks/vault-setup-backend-controlplane.yml:35
>   5303 1588066633.38971: sending task start callback
>   5303 1588066633.38999: entering _queue_task() for
> 10.2.4.50/hashivault_write
>   5303 1588066633.39466: worker is 1 (out of 1 available)
>   5303 1588066633.39610: exiting _queue_task() for
> 10.2.4.50/hashivault_write
>   5303 1588066633.39665: done queuing things up, now waiting for results
> queue to drain
>   5303 1588066633.39697: waiting for pending results...
>   6022 1588066633.39909: running TaskExecutor() for 10.2.4.50/TASK: vault
> : Configure Kubernetes Auth for ControlPlane
>   6022 1588066633.40131: in run() - task
> 0242ac11-0002-dd43-f45e-0146
>   6022 1588066633.40297: calling self._execute()
>   6022 1588066633.41278: Loading FilterModule 'core' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/core.py (fo
> und_in_cache=True, class_only=False)
>   6022 1588066633.41436: Loading FilterModule 'gcp_kms_filters' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/
> gcp_kms_filters.py (found_in_cache=True, class_only=False)
>   6022 1588066633.41590: Loading FilterModule 'ipaddr' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/ipaddr.py
>  (found_in_cache=True, class_only=False)
>   6022 1588066633.41684: Loading FilterModule 'json_query' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/json_
> query.py (found_in_cache=True, class_only=False)
>   6022 1588066633.41832: Loading FilterModule 'k8s' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/k8s.py (foun
> d_in_cache=True, class_only=False)
>   6022 1588066633.41894: Loading FilterModule 'mathstuff' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/mathst
> uff.py (found_in_cache=True, class_only=False)
>   6022 1588066633.41941: Loading FilterModule 'network' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/network.
> py (found_in_cache=True, class_only=False)
>   6022 1588066633.41993: Loading FilterModule 'urls' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/urls.py (fo
> und_in_cache=True, class_only=False)
>   6022 1588066633.42030: Loading FilterModule 'urlsplit' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/filter/urlspli
> t.py (found_in_cache=True, class_only=False)
>   6022 1588066633.42201: Loading TestModule 'core' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/test/core.py (found_
> in_cache=True, class_only=False)
>   6022 1588066633.42234: Loading TestModule 'files' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/test/files.py (foun
> d_in_cache=True, class_only=False)
>   6022 1588066633.42271: Loading TestModule 'mathstuff' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/test/mathstuff.
> py (found_in_cache=True, class_only=False)
>   6022 1588066633.45403: trying
> /py36env/lib64/python3.6/site-packages/ansible/plugins/connection
>   6022 1588066633.45567: Loading Connection 'ssh' from
> /py36env/lib64/python3.6/site-packages/ansible/plugins/connection/ssh.py (fo
> und_in_cache=True, class_only=False)
>   6022 1588066633.45622: trying
> /py36env/lib64/python3.6/site-packages/ansible/plugins/shell
>   6022 

[ansible-project] ERROR: Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips

2020-04-28 Thread Parasuram A Havoji
Hello, 

I am seeing the below error while running playbook, i ran playbook with 
debug enabled and with increased verbose level but not sure of the root 
cuase of failure. Can someone please help me find the issue; thank you

Below is my configuration;

Ansible Master node;

# ansible --version
ansible 2.9.2
  config file = /root/galorndon-infra/playbooks/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /py36env/lib64/python3.6/site-packages/
ansible
  executable location = /py36env/bin/ansible
  python version = 3.6.8 (default, Aug  7 2019, 08:02:28) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-39.0.1)]
#
# rpm -qa |grep openssh
openssh-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
#




Managed node;
=
[root@vault1 ~]# python --version
Python 2.7.5
[root@vault1 ~]#
[root@vault1 ~]#
[root@vault1 ~]# rpm -qa |grep openssh
openssh-7.4p1-21.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-server-7.4p1-21.el7.x86_64
[root@vault1 ~]#
[root@vault1 ~]#


Playbook error ;


TASK [vault : Configure Kubernetes Auth for ControlPlane] 
*
task path: 
/root/galorndon-infra/playbooks/roles/vault/tasks/vault-setup-backend-controlplane.yml:35
  5303 1588066633.38971: sending task start callback
  5303 1588066633.38999: entering _queue_task() for 
10.2.4.50/hashivault_write
  5303 1588066633.39466: worker is 1 (out of 1 available)
  5303 1588066633.39610: exiting _queue_task() for 
10.2.4.50/hashivault_write
  5303 1588066633.39665: done queuing things up, now waiting for results 
queue to drain
  5303 1588066633.39697: waiting for pending results...
  6022 1588066633.39909: running TaskExecutor() for 10.2.4.50/TASK: vault : 
Configure Kubernetes Auth for ControlPlane
  6022 1588066633.40131: in run() - task 
0242ac11-0002-dd43-f45e-0146
  6022 1588066633.40297: calling self._execute()
  6022 1588066633.41278: Loading FilterModule 'core' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/core.py (fo
und_in_cache=True, class_only=False)
  6022 1588066633.41436: Loading FilterModule 'gcp_kms_filters' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/
gcp_kms_filters.py (found_in_cache=True, class_only=False)
  6022 1588066633.41590: Loading FilterModule 'ipaddr' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/ipaddr.py
 (found_in_cache=True, class_only=False)
  6022 1588066633.41684: Loading FilterModule 'json_query' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/json_
query.py (found_in_cache=True, class_only=False)
  6022 1588066633.41832: Loading FilterModule 'k8s' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/k8s.py (foun
d_in_cache=True, class_only=False)
  6022 1588066633.41894: Loading FilterModule 'mathstuff' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/mathst
uff.py (found_in_cache=True, class_only=False)
  6022 1588066633.41941: Loading FilterModule 'network' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/network.
py (found_in_cache=True, class_only=False)
  6022 1588066633.41993: Loading FilterModule 'urls' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/urls.py (fo
und_in_cache=True, class_only=False)
  6022 1588066633.42030: Loading FilterModule 'urlsplit' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/filter/urlspli
t.py (found_in_cache=True, class_only=False)
  6022 1588066633.42201: Loading TestModule 'core' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/test/core.py (found_
in_cache=True, class_only=False)
  6022 1588066633.42234: Loading TestModule 'files' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/test/files.py (foun
d_in_cache=True, class_only=False)
  6022 1588066633.42271: Loading TestModule 'mathstuff' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/test/mathstuff.
py (found_in_cache=True, class_only=False)
  6022 1588066633.45403: trying 
/py36env/lib64/python3.6/site-packages/ansible/plugins/connection
  6022 1588066633.45567: Loading Connection 'ssh' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/connection/ssh.py (fo
und_in_cache=True, class_only=False)
  6022 1588066633.45622: trying 
/py36env/lib64/python3.6/site-packages/ansible/plugins/shell
  6022 1588066633.45690: Loading ShellModule 'sh' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in
_cache=True, class_only=False)
  6022 1588066633.45727: Loading ShellModule 'sh' from 
/py36env/lib64/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in
_cache=True, class_only=False)
  6022 1588066633.45775: trying 
/py36env/lib64/python3.6/site-packages/ansible/plugins/become
  6022 1588066633.45860: Loading BecomeModule 'sudo' from 

Re: [ansible-project] Input validation on user-supplied variable (example, setting environment to production/development/staging)

2020-04-28 Thread Dick Visser
Hi


On Mon, 27 Apr 2020 at 23:15, Michael S. Moody
 wrote:
>
> Good afternoon,
>
> I opened an issue on GitHub, and was directed here, which is the obvious 
> place. (I initially thought that the behavior was indeed a bug, but there was 
> some clarity added).
>
> What would be the preferred method to perform input validation on a user 
> supplied variable provided via extra vars? Is the recommended approach to 
> simply handle an error (and end the host, play or task) if the variable 
> doesn't match an expected input, as it is not possible to overwrite it due to 
> precedence?
>
> As it was, we were trying to use "-e" for the extra variables, and then using 
> set_fact to overwrite it if it didn't meet the expected requirements.
>
> This is what I was trying:
>
> ###This works as expected
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: deploy_environment is undefined
>
>   tags:
> - variable-test-task
>
> ###This does not work
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: deploy_environment != "Development"
>
>   tags:
> - variable-test-task
>
> ###This does not work
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: deploy_environment == "Production"
>
>   tags:
> - variable-test-task
>
> ###This does not work, playing with syntax, might be expected
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: not (deploy_environment is defined) or not ((deploy_environment == 
> 'Development') or (deploy_environment == 'Production'))
>
>   tags:
> - variable-test-task
>
> ###This does not work, playing with syntax, might be expected
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: (deploy_environment is undefined) or ((deploy_environment != 
> 'Development') or (deploy_environment != 'Production'))
>
>   tags:
> - variable-test-task
>
> ###This does not work, playing with syntax, might be expected
> - name: "Setting Deploy Environment Variable for Deployment Tasks"
>   set_fact:
> deploy_environment: "Development"
>
>   when: (deploy_environment != 'Development') or (deploy_environment != 
> 'Production')
>
>   tags:
> - variable-test-task
>
>
> And that was patiently explained to have been by design. I'm open to 
> suggestions on the best overall way to accomplish this.

You're right about the precedence getting in the way of altering
variables set with '-e', that's indeed not possible.
However this is usually not a problem, as long as you use it to
override something that is set already.
But set_fact can't win from '-e', so that won't work.
There are a few alternatives.
I usually avoid having to change variables directly, and instead use
two variables. One meant for 'internal' use inside the role, which as
a convention, I prefix with an underscore.
For instance '_env'. And then have an 'external' var meant for command
line usage, say 'deploy_environment'. Then any logic with set_fact etc
will work.

But, looking at your code again - all you seem to want is to provide a
default for the 'deploy_environment' variable.
In that case, '-e' will just work fine, for instance:

- hosts: localhost
  connection: local
  gather_facts: no

  vars:
deploy_environment: Development

  tasks:
- debug:
msg: |
  We are deploying the {{ deploy_environment }} environment now



If you run this without any '-e' switched, it will use Development.
And you can just override it with '-e deploy_environment=Production'.

For failing gracefully, look at the 'assert' module. The following
example ensure only valid environments are being used:


---
- hosts: localhost
  connection: local
  gather_facts: no

  vars:
deploy_environments:
  - Development
  - Production
  - Testing
  - Acceptance

deploy_environment: "{{ deploy_environments | first }}"

  tasks:
- name: Ensure we use a valid environment
  assert:
that:
  - deploy_environment in deploy_environments
fail_msg: "Available environments are: {{ deploy_environments
| join(', ') }}."

- debug:
msg: |
  We are deploying the {{ deploy_environment }} environment now





Dick







--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNf7H7wxnZECaKT6Y51Q_Fpg_zcsu-hRJWZGERTywTrGQ%40mail.gmail.com.


[ansible-project] Re: copy j2 file to Json on windows server

2020-04-28 Thread Jordan Borean
Remove remote_src: true as it's expecting you to supply src for the copy. 
Better yet use win_template instead like

- win_template:
   src: config.j2
dest: D:\config1.json


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8c3816e3-703c-490a-a591-ed7256bf0c59%40googlegroups.com.


Re: [ansible-project] Writing/Augmenting Host Variables from a Playbook.

2020-04-28 Thread Stefan Hornburg (Racke)
On 4/27/20 10:12 AM, Marc Haber wrote:
> Let's assume I have a service that can listen on different combinations
> or host/port:
> 

Hello Marc,

nice to see you here :-). This is certainly doable:

---
- hosts: all

  vars:
host:
  service:
hostname: "google.com"
ports:
  - "80"
  - "443"
  tasks:
- name: Get DNS records
  set_fact:
ip_addresses: "{{ ip_addresses | default([]) + lookup('dig', 
host.service.hostname + '/' + item, wantlist=True) }}"
  loop:
- A
- 
   when: "'listen' not in host.service"

- name: Determine all combinations of IP address and ports
  set_fact:
ips_ports:  "{{ ip_addresses | product(host.service.ports) | list }}"
  when: "'listen' not in host.service"

- name: Turn list members into dictionaries
  set_fact:
host:
  service:
listen: "{{ host.service.listen | default([]) +  [{ 'ip': item[0], 
'port': item[1] }] }}"
  loop: "{{ ips_ports }}"
  when: ips_ports is defined

- debug:
msg: "{{ host }}"

Give it a try and let me know if it works. Or if you need help to understand 
how it works :-).

Regards
 Racke

> ---
> host:
>   service:
> listen:
> - ip: "2001:db8:1:2::1"
>   port: "80"
> - ip: "2001:db8:1:2::1"
>   port: "443"
> - ip: "192.0.1.2"
>   port: "80"
> 
> let's also assume that the vast majority of cases use a rather simple
> setup so that it would be tedious to write the standard configuration
> over and over again, so it would be nice if one could just write:
> 
> ---
> host:
>   service:
> hostname: "some-dns-name.example"
> ports:
> - "80"
> - "443"
> 
> I would then like to have some component of my ansible setup to go to
> DNS, look up A and  records for the DNS name and generate the
> detailed listen configuration.
> 
> Given some-dns-name.example would have an A record of 192.0.1.40 and an
>  record of 2001:db8:1::40, the data structure built would be
> 
> ---
> host:
>   service:
> listen:
> - ip: "2001:db8:1::40"
>   port: "80"
> - ip: "2001:db8:1::40"
>   port: "443"
> - ip: "192.0.1.40"
>   port: "80"
> - ip: "192.0.1.40"
>   port: "443"
> 
> so that the tasks and templates could always act as if the fully
> detailed configuration were explicitly given, while giving the admin the
> possibility to always write doen the fully detailed configuration
> explicitly AND the ease of writing down the easier form for the standard
> cases.
> 
> I could have a program read in the inventory, write out a temporary
> inventory with the "augmented" host variables and then have ansible run
> from this, but I hope that this won't be necessary...
> 
> Greetings
> Marc
> 
> 


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f84938f1-21b5-dc05-f4b5-e4151da4113d%40linuxia.de.


signature.asc
Description: OpenPGP digital signature


Re: [ansible-project] Ansible Tower: Passing extra variables from one workflow template to other

2020-04-28 Thread Stefan Hornburg (Racke)
On 4/27/20 3:52 PM, Kaliyug Antagonist wrote:
> *Ansible 2.9.2*
> *Tower 3.6.1*
> *

Hello Kaliyug,

Tower is not a subject of this list, only Ansible itself.

Please contact RedHat support.

Regards
 Racke

> *
> There are two Bitbucket repositories viz. *bitbucketconfigurator* and 
> *sonarconfigurator* which contain playbooks to
> configure Bitbucket and Sonarqube projects, respectively. Here, showing just 
> the bitbucketConfigurator*:*
> *
> *
> 
> bitbucketconfigurator-playbooks.png
> 
> 
> *
> *
> In the above project, there is a ***group_vars/all yaml** *file as 
> follows*(note the entry bitbucket_token: "{{
> PAT_admin_admin }}"):*
> *
> *
> |
>     # Defaults used for branch access and restrictions
>     # Global vars used for rest api
>     bitbucket_base_url:'https://git.net'
>     bitbucket_rest_base_endpoint:'rest/api/1.0/projects'
>     bitbucket_rest_url:"{{ bitbucket_base_url }}/{{ 
> bitbucket_rest_base_endpoint }}"
>     bitbucket_branch_rest_endpoint:"rest/branch-permissions/2.0/projects"
>     bitbucket_branching_url:"{{ bitbucket_base_url 
> }}/rest/branch-utils/1.0/projects"
>     sonar_for_bitbucket_base_endpoint:'rest/sonar4stash/1.0/projects'
>     bitbucket_token:"{{ PAT_admin_admin }}"
>     bitbucket_rest_api_latest:'rest/api/latest'
>     bitbucket_project_name_lc:"{{ bitbucket.project.name  | lower }}"
>     bitbucket_repository_name_lc:"{{ bitbucket.project.repository.name  | 
> lower }}"
> |
> *
> *
> *
> *
> The list of *job templates*, an example is shown further, below:
> 
> job-templates-corresponding-to-playbooks.png
> 
> 
> *
> *
> *
> *
> As an example, let's consider the *bb_configure *job template I am using 
> 'Extra Variables' to pass a yml file/dictionary
> e.g:
> 
> extra-vars-passed-to-job-templates.png
> 
> 
> *
> *
> *
> *
> Here is the list of all the workflow templates, I will summarize their usage 
> subsequently:
> 
> work-flow-templates.png
> 
> 
> *
> *
> *
> *
> I tested the bitbucketconfigurator playbooks in a single workflow viz. 
> wt-bitbucket. It runs successfully. *Note that it
> uses no-arg versions of the individual playbooks i.e the config yaml file is 
> passed to the wt-bitbucket and NOT the
> individual playbooks.*
> 
> workflow-template-bitbucket.png
> 
> 
> *
> *
> *
> *
> In the above workflow template, the extra vars are used:
> 
> workflow-template-extra-vars.png
> 
> 
> *
> *
> *
> *
> Now, I am using the *wk_onboarding_pipeline as a 'master' workflow template* 
> which invokes the no-arg versions of the
> workflow templates:
> *
> *
> 
> master-workflow-template.png
> 
> *
> *
> *
> *
> *
> *
> This 'master' template now has the config yaml file, also, note the entry 
> *PAT_admin_admin:*
> 
> master-workflow-template-extra-vars.png
> 
> 
> *
> *
> *
> *
> *Issue:*
> When I run this 'master' template, the first playbook of the first workflow 
> template fails as it is *unable to access
> the 'PAT_admin_admin' passed in the extra vars.*
> *
> *
> 
> error-master-template.png
> 
> 
> 
> Am I making a mistake in the invocation or have I incorrectly configured the 
> workflow templates within a workflow template?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/7e96426e-1592-4775-a3dd-5b2053e073fa%40googlegroups.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9c9d1603-cdf6-b6f4-6890-8b82ccbc3240%40linuxia.de.


signature.asc
Description: OpenPGP digital signature