[ansible-project] Appending a line in a file

2019-02-25 Thread lpescatore via Ansible Project
Hi, I want to add some stuff to my /etc/hosts file. For instance, if my /etc/hosts says "server.corp", I want to append that in all my machines to where it says "server.corp.company.com". Then I want it to save. What is the best module for that , and can you tell me what the play might look

[ansible-project] best way to go about dhcp

2018-05-15 Thread lpescatore via Ansible Project
Hi, Posting a hypothetical. Since my windows environment relies on a hosts file with addresses in said file, what do you do when your environment is dhcp? Like if the IPs keep changing, whats to be done in the hosts file? -- You received this message because you are subscribed to the Google

[ansible-project] Re: time out

2018-05-15 Thread lpescatore via Ansible Project
Hi, just curious, when you run this , what do you get? ansible -i (hosts path) -m ping On Monday, May 14, 2018 at 7:25:49 AM UTC-7, Tcpip wrote: > > > Hi all, > > ansible 2.4.0.0 > config file = /etc/ansible/ansible.cfg > configured module search path = >

[ansible-project] Re: win_package

2018-04-11 Thread lpescatore via Ansible Project
Hi Bill, Try this: become: yes become_method: runas become_user: SYSTEM On Wednesday, April 11, 2018 at 9:24:28 AM UTC-7, William Dossett wrote: > > Hi, > > Fairly new to Ansible, but I am just finishing a fairly extensive course > on Linux Academy. I have some good use cases... the

[ansible-project] Re: Ansible win_copy or win_file error "The given path's format is not supported"

2018-03-14 Thread lpescatore via Ansible Project
Does Ansible work on a vm pool using DHCP? How do you get the hosts file to scan for addresses? On Wednesday, March 14, 2018 at 11:50:29 AM UTC-7, Augusto Canessa wrote: > > I'm having a problem creating or copying files from my Ansible box to > windows. Commands like reboot work fine. But any

[ansible-project] Re: Issue with script not working on Windows/Cygwin

2018-03-14 Thread lpescatore via Ansible Project
Cygwin is a real PITA in relation to windows permissions. I hate it. But, it's doable. On Tuesday, March 13, 2018 at 1:27:24 PM UTC-7, lpesc...@google.com wrote: > > Hi, all. > I have an issue with a certain script (permissions) whilst using ansible. > First of all, I have one script that does

[ansible-project] Re: Issue with script not working on Windows/Cygwin

2018-03-14 Thread lpescatore via Ansible Project
Hi Jordan, Thanks for your help. I tried running the commands the way you said, but they do not work for me without the cmd.exe /c start portions. Anyway, I got this to work. The way I did it was make a win_acl play, give the C:\cygwin folder full control to everyone, and then run the scripts

[ansible-project] Re: Ansible windows issue about running yml task

2018-03-14 Thread lpescatore via Ansible Project
This is one of my plays. - name: Make Tools folder win_file: path: C:\Tools state: directory - name: Make build folder win_file: path: C:\build state: directory - name: Make TEMP folder win_file: path: C:\TEMP state: directory

[ansible-project] Re: Ansible windows issue about running yml task

2018-03-14 Thread lpescatore via Ansible Project
You don't have whitespace right, which Ansible is very finicky about. Try: - name: Create directory structure win_file: path: C:\Temp\folder\subfolder state: directory Don't use "tab" keys, use your space bar. HTH, Larry On Wednesday, March 14, 2018 at 4:35:40 AM UTC-7, selim sarısu

[ansible-project] Issue with script not working on Windows/Cygwin

2018-03-13 Thread lpescatore via Ansible Project
Hi, all. I have an issue with a certain script (permissions) whilst using ansible. First of all, I have one script that does work: *#!/bin/bash* *set -xe* *chmod 660 /etc/rsyncd.secrets* *mkpasswd > /etc/passwd* *sed -i 's/^YRunner/yrunner/' /etc/passwd* I run it with this command set in the

[ansible-project] Re: Cygwin breaking ansible

2018-02-09 Thread lpescatore via Ansible Project
Bump, again. On Tuesday, January 30, 2018 at 1:59:24 PM UTC-8, lpesc...@google.com wrote: > > Hi folks, I have a WEIRD problem. > After running cygwin ssh-host-config on my PC, which starts sshd and rsync > services, suddenly I can no longer run ansible. > I get this error: > >

[ansible-project] Re: Cygwin breaking ansible

2018-02-01 Thread lpescatore via Ansible Project
Bumping-Anyone at all know why? On Tuesday, January 30, 2018 at 1:59:24 PM UTC-8, lpesc...@google.com wrote: > > Hi folks, I have a WEIRD problem. > After running cygwin ssh-host-config on my PC, which starts sshd and rsync > services, suddenly I can no longer run ansible. > I get this error:

[ansible-project] Cygwin breaking ansible

2018-01-30 Thread lpescatore via Ansible Project
Hi folks, I have a WEIRD problem. After running cygwin ssh-host-config on my PC, which starts sshd and rsync services, suddenly I can no longer run ansible. I get this error: root@Raspi_Ctrl:/ansible/playbook/nuc# ansible -i /ansible/hosts nuc -m win_ping * [WARNING]: FATAL ERROR DURING FILE

[ansible-project] Re: How to measure the time a task is taking to complete

2018-01-24 Thread lpescatore via Ansible Project
What I do is run the - option on my play and note the start time. On Wednesday, January 24, 2018 at 8:38:02 AM UTC-8, Narahari Lakshminarayana wrote: > > Friends: > > Is there a way to measure the amount of time it takes to run task so I can > get an idea how much time we are spending to

[ansible-project] Getting a batch to run as administrator Windows

2018-01-24 Thread lpescatore via Ansible Project
Hi, TL;DR - need the "run as administrator" to be automated. I have tried and tried to get a bat file to run as administrator on a windows box. What it is supposed to do is chmod a file in cygwin. Manually, if i right click and run as administrator, it works fine. If I run my play

[ansible-project] Re: "Start in" field for win_shortcut

2018-01-14 Thread lpescatore via Ansible Project
J! I think I just fixed it! Just for s+g's, I tried using directory AND src, and I believe it works now! Thanks! Very happy! Larry On Sunday, January 14, 2018 at 10:22:57 AM UTC-8, lpesc...@google.com wrote: > > Hi J, > Thanks for the reply. > directory: does not do what i need. > I am afraid

[ansible-project] Re: "Start in" field for win_shortcut

2018-01-14 Thread lpescatore via Ansible Project
Hi J, Thanks for the reply. directory: does not do what i need. I am afraid I might hose something when I try this. Would I be looking at the "win_shortcut.psl" file? I have no idea what I would add. Do you think you could be more specific? I'm not yet a confident coder. On Sunday, January

[ansible-project] Re: "Start in" field for win_shortcut

2018-01-13 Thread lpescatore via Ansible Project
Hi Jon, The idea is to put a .py script into the shell:startup folder. So, I create a shortcut. When I manually create

[ansible-project] "Start in" field for win_shortcut

2018-01-12 Thread lpescatore via Ansible Project
Hi, Im making a shortcut in shell:startup, which works. BUT: It does not work properly. I have found the reason for this is when you right click the shortcut, the "Start In" field is empty. When I do it manually, the start in field IS populated with the directory I want. Is there any way to

[ansible-project] Re: chmod not working

2018-01-05 Thread lpescatore via Ansible Project
Thanks Jordan, I am trying win_acl: - name: chmod foo.foo win_acl: user: user path: C:\cygwin\etc\foo.foo type: allow state: present rights: Read,Write BUT-- When I stat I still get: Access: (0755/-rwxr-xr-x) Uid: ( 544/Administrators) Gid: (197121/ None)

[ansible-project] chmod not working

2018-01-03 Thread lpescatore via Ansible Project
HI, I have a play that SHOULD copy a file over from my server to a Windows box AND set permissions to 660 (notice I have tried both modes below separately): win_copy: src: /ansible/playbook/foo.foo dest: C:\mydir\foo.foo state: file mode: "ug+rw" OR mode: 0660 The

[ansible-project] Run a .json file via command line

2017-12-21 Thread lpescatore via Ansible Project
Hi, I want to start a json (gcloud) file via command line (win 10 pc) in ansible. What I am trying now is: name: run command win_command: C:\Windows\System32\cmd.exe gcloud auth activate-service-account --key-file=C:\Users\user\Desktop\foo.json All that happens is the command prompt

[ansible-project] Re: strange error on a google cloud sdk install

2017-11-27 Thread lpescatore via Ansible Project
Bumping, What params do i need to set? This is a simple exe file so it ought to work! On Wednesday, November 22, 2017 at 1:00:23 PM UTC-8, lpesc...@google.com wrote: > > Hi, > On a WIn 10 home system (from my linux ctrl machine), I am running the > following: > > - name: Download Google

[ansible-project] strange error on a google cloud sdk install

2017-11-22 Thread lpescatore via Ansible Project
Hi, On a WIn 10 home system (from my linux ctrl machine), I am running the following: - name: Download Google Cloud SDK win_get_url: url: https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe dest: C:\TEMP\cloud.exe - name: Install Google Cloud

[ansible-project] Ansible Install of MS Visual Studio Professional with Updates hanging

2017-11-14 Thread lpescatore via Ansible Project
I have a play that installs MS Visual Studio, but it seems to hang. Im on Win10 Professional. The below is: 1) My syntax from the playbook 2) My log file. Any ideas? 1) - name: Install Visual Studio win_command: 'C:\Users\pkmbuilder\Desktop\VisualStudio.exe --includeRecommended

[ansible-project] Running exe on windows from a batch file

2017-11-08 Thread lpescatore via Ansible Project
HI folks, I have copied a batch file from ansible to windows and want to run it. If i go to the windows machine and run it it works fine, but when I run it from playbook it fails. Here is the playbook: --- - name: test script module hosts: builders tasks: - name: run

[ansible-project] vault question

2017-10-31 Thread lpescatore via Ansible Project
Hi, So What i am trying to do is have my passwords encrypted. The problem is the hosts file wont refer to the vault. My files are below (with only the needed info, and passwords changed for this post): from /ansible/hosts: ansible_password=secret from /ansible/hosts (tried this but it doesn't

[ansible-project] Re: Batch file run on a windows host

2017-10-27 Thread lpescatore via Ansible Project
I got it! I used win_command instead. --- - name: test script module hosts: nuc tasks: - name: run simple script win_command: C:\Users\yrunner\Desktop\lp1.bat Works great! -- You received this message because you are subscribed to the Google Groups "Ansible

[ansible-project] Batch file run on a windows host

2017-10-27 Thread lpescatore via Ansible Project
Hi, Im trying to run a .bat file on windows from ansible. Below is my playbook and error message. The file IS on the path specified. Thanks! --- - name: test script module hosts: nuc tasks: - name: run simple script script: C:\lp1.bat

[ansible-project] Having issue finding my hosts

2017-10-25 Thread lpescatore via Ansible Project
I keep my hosts file in /ansible/. I have a play I'm trying to figure out that does a very simple thing, copies a small file from the Linux control machine (pi) to Windows machine or two. However, when I run it, I get an error. Here's my hosts file: root@Raspi_Ctrl:/ansible/playbook# cat