Hi guys,
I am launching this playbook but it does not give an error and it does not
do what it is supposed to do.
How can I debug the error?
- name: Customize Domain
vmware_vm_shell:
hostname: '{{ VCENTER }}'
username: '{{ DOMAIN_VCENTER }}\user'
password: '*
It would help if you would describe what it is supposed to do...
On Mon, May 14, 2018 at 9:38 PM, Josu Vilda wrote:
> Hi guys,
> I am launching this playbook but it does not give an error and it does not
> do what it is supposed to do.
> How can I debug the error?
>
> - name: Customize Domai
This module, should launch the following command which join the vmware in
domain.
Launch in host vmware 'c:\windows\system32\wbem\wmic.exe ComputerSystem
where name={{ NOMBRE }} call joindomainorworkgroup fjoinoptions=3 name={{
DOMINIO }}'
*Josu Rodriguez Vilda*
Consultant
Skype:jrvilda
P Befo
this seems to work. seems the easiest way to "clear" existing permissions
to start over by disabling the inherited permissions. a normal user cant
list and gets access denied if they try to open a specific file that they
know the path to. an admin can do anything. am i missing anything? is there
The problem is that I do not know where to see the error that the command
gives.
El lunes, 14 de mayo de 2018, 13:49:17 (UTC+2), Josu Vilda escribió:
>
> This module, should launch the following command which join the vmware in
> domain.
>
> Launch in host vmware 'c:\windows\system32\wbem\wmic
TASK [debug var=value, verbosity=3]
*
task path: /etc/ansible/playbooks/vCenter/Despliegue.yml:169
ok: [localhost] => {
"value": {
"ansible_job_id": "971027648920.50828",
"changed": true,
Ok,
Here's what I got, so, I'll see what I can find on the module mentioned:
MacBook-Pro:playbooks anthony$ python -c "from requests_ntlm import
HttpNtlmAuth"
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/requests_ntlm/__init__.py", line
1,
'Looks like the system sees it as already being installed:
MacBook-Pro:playbooks anthony$ pip2.7 install pycrypto
Requirement already satisfied (use --upgrade to upgrade): pycrypto in
/Library/Python/2.7/site-packages
Cleaning up...
On Monday, May 14, 2018 at 10:22:05 AM UTC-4, Ab Generette wr
$ ansible --version
ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path =
[u'/home/scscm_builder/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location =
/usr/local/lib/python2.7/site-packages/ansible-2.4.0.0-py2.7.
I meant to say "I'm trying to use the "expect" module in ansible..."
On Monday, May 14, 2018 at 11:35:43 AM UTC-4, ZillaYT wrote:
>
> $ ansible --version
> ansible 2.4.0.0
> config file = /etc/ansible/ansible.cfg
> configured module search path =
> [u'/home/scscm_builder/.ansible/plugins/modu
It requires it on the machine and python the module executes on, use
-vvv to verify you are matching both, by default the implicit
localhost should ensure that they are the same as you expect, but if
you added localhost to your inventory you might be using a different
python http://docs.ansible.com
Thanks Brian. I should've indicated that I'm running this on localhost
$ ansible-playbook -i "localhost," test-expect.yml
I added the
ansible_python_interpreter: python2.7
in my playbook and it worked for now. For some reason, this "{{
ansible_playbook_python
}}" didn't work for me, but I'll
The -i 'localhost,' is probably what is causing the issue as you are
defining localhost, see the docs i linked in previous message for a
full explanation.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubs
Per https://groups.google.com/forum/#!topic/ansible-project/AXEPsAqxmNE I'm
using the expect module, and have it working when the prompt is single
line. How do I make it work when the prompt is multi-line? I'm not talking
about multi-prompts.
Let me explain.
ansible v2.4.0.0
I'm trying to aut
On 14.05.2018 19:02, ZillaYT wrote:
Per https://groups.google.com/forum/#!topic/ansible-project/AXEPsAqxmNE
I'm
using the expect module, and have it working when the prompt is single
line. How do I make it work when the prompt is multi-line? I'm not
talking
about multi-prompts.
Let me explain
This helped some, but brought up the next issue.
The keytool command has multiple multi-lined prompts, with "[Unknown]" as
the second line, so if I do this
tasks:
- name: Test expect
expect:
timeout: 5
echo: yes
command: keytool -genkey -alias tomcat -keyalg RSA -sigalg
Thanks Kai. Your comment "Expect is just looking a a stream of bytes" gave
me the idea to just look for a "string of bytes" that's present in each
prompt. The following now works.
- name: Test expect
expect:
timeout: 5
echo: yes
command: keytool -genkey -alias tomcat -key
I have a CentOS7 control server from which I am trying to manage a few
Server2012/Cygwin nodes. Those latter nodes have Cygwin setup such that
its sshd component is installed and running (I'm able to successfully ssh
to the targets).
My ~/.ansible.cfg is the active one and this file contains
Pycrypto is not the same as cryptography, the package is literally called
cryptography and should be installed.
Thanks
Jordan
--
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,
I'm still getting the same error:
(ansible) MacBook-Pro:playbooks anthony$ ansible wrk04 -e
@~/.ansible/secure.yml -m win_ping --ask-vault-pass
Vault password:
wrk04 | UNREACHABLE! => {
"changed": false,
"msg": "ntlm: requested auth method is ntlm, but requests_ntlm is not
installed",
Are you still getting the import error when trying to manually import
cryptography, you need to solve that first before using 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 f
I'm a bit confused, do you need to use Cygwin to run this script,
everything would be so much simpler if you ignored Cygwin and used
something like PowerShell or pure Python? For your current playbook there
are a few issues I see;
- Windows modules, like win_template, do not support the mode
No, I'm no longer seeing the error on attempt to manually import
cryptography.
On Monday, May 14, 2018 at 3:44:41 PM UTC-4, Jordan Borean wrote:
>
> Are you still getting the import error when trying to manually import
> cryptography, you need to solve that first before using Ansible.
>
--
You
On 14.05.2018 20:31, ZillaYT wrote:
This helped some, but brought up the next issue.
The keytool command has multiple multi-lined prompts, with "[Unknown]"
as
the second line, so if I do this
tasks:
- name: Test expect
expect:
timeout: 5
echo: yes
command: keytool -g
What about import requests_ntlm? If that works but Ansible doesn't it
sounds like Ansible is using a different Python interpreter to the one you
tested on.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and s
Thanks, Jordan. Ok, I believe I see what you mean. I only went down this
convoluted path involving the script and all, because of other problems
that I ran into.
Changing that playbook to:
---
- hosts: "{{ targets }}"
user: "{{ admin }}"
gather_facts: yes
vars:
python_exec: /cygdri
Does this shed any light(?):
(ansible) MacBook-Pro:playbooks anthony$ ansible wrk04 -e
@~/.ansible/secure.yml -m win_ping --ask-vault-pass
Vault password:
wrk04 | UNREACHABLE! => {
"changed": false,
"msg": "ntlm: requested auth method is ntlm, but requests_ntlm is not
installed",
"un
Looks like the python on your PATH is at /Users/anthony/ansible/bin/python
but the Ansible command is on /Library/Python/2.7 which is different.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receivin
Hmm, looks like your host vars isn't matching which what I expect, it is
actually connecting over SSH and not WinRM when your original post said you
defined ansible_connection: winrm. Is there a reason why you are using
SSH/Cygwin on Windows, we don't support it currently as a valid
configurati
Hello community,
I have written the following ansible script
---
# Playbook file: loopplay.yml
-
name: loopplay
hosts: centos2
tags:
- loopplay
tasks:
-
name: looptask
user:
name: "{{ item }}"
state: present
don't offset from list item:
# Playbook file: loopplay.yml
- name: loopplay
hosts: centos2
tags:
- loopplay
tasks:
- name: looptask
user:
name: "{{ item }}"
state: present
groups: "wheel"
loop:
Firstly - sorry for the noob question.
I've written a Powershell script that is run from a play that returns in
json the name of a zip file.
Output from Powershell
{
"Name": "latest-ansible v0.1.zip"
}
***playbook***
---
- hosts: all
vars:
filename: none
tasks:
- name: I
Why are you setting "verbosity: 3"? According to
http://docs.ansible.com/ansible/latest/modules/debug_module.html, that
means "if you set to 3 it will only run debug when -vvv or above". That's
causing Ansible to skip the task, thus the message you're seeing
("Verbosity threshold not met").
Re
The issue you are seeing is that you are using the stdout_lines return
value which is the stdout of the script that was run but split into a list
on each newline. You want to use the stdout return value from the script
which would be the full stdout of your json. The task's would look
something
Thanks Jordan! That code worked a treat - really appreciate your assistance
and detailed explanations below.
On Tuesday, May 15, 2018 at 12:58:42 PM UTC+12, java_cat33 wrote:
>
> Firstly - sorry for the noob question.
>
> I've written a Powershell script that is run from a play that returns in
>
Jordan do you know how to strip the ".zip" off the file name? I've been
looking at http://jinja.pocoo.org/docs/2.10/templates/#truncate but haven't
cracked it yet.
On Tuesday, May 15, 2018 at 2:17:32 PM UTC+12, java_cat33 wrote:
>
> Thanks Jordan! That code worked a treat - really appreciate you
Hey
There are a few ways to do this, they usually revolve around using filters
to "filter" the value into something else. Ansible has a few filters
available outside of the standard Jinja2 functions which can be found here
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.htm
Nice - thanks Jordan. That's easier than what I've just done
win_file:
path: C:\inetpub\{{ script_filename.Name | regex_replace('.zip$','')
}}
Thanks again!
On Tuesday, May 15, 2018 at 3:56:20 PM UTC+12, Jordan Borean wrote:
>
> Hey
>
> There are a few ways to do this, they usually re
I found how to loop over the data, but i still didn't figure out how to
select inside specific data
- name: test 1
debug:
msg: "{{ item.key }}"
with_dict: "{{ ansible_disks }}"
Got:
ok: [hostname] => (item=None) => {
I need help in updating /etc/grub.conf file to disable THP in Linux servers. I
used below Ansible lineinfile module but it updates the kernel line everytime
when I run it, I need which runs and updates every line of kernel in /etc/fstab
file. Please suggest.
name: disable THP (RedHat)
lineinf
On 15/05/18 18:23, Padmesh Singh wrote:
> I need help in updating /etc/grub.conf file to disable THP in Linux servers.
> I used below Ansible lineinfile module but it updates the kernel line
> everytime when I run it, I need which runs and updates every line of kernel
> in /etc/fstab file. Pleas
41 matches
Mail list logo