Re: [ansible-project] Appending a line in a file

2019-02-25 Thread 'Larry Pescatore' via Ansible Project
Thank you sir, I am trying to find out how that exactly would look in my file (I am new to regexp so please forgive me). Heres what my file looks like: cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 server-rack5-test-server-5 What I need it to change to (on a dynamic level, as in "server-rack5-tes

Re: [ansible-project] best way to go about dhcp

2018-05-16 Thread 'Larry Pescatore' via Ansible Project
Is there a module for dhcp scan? Sent from my iPhone. Please excuse any typos. > On May 16, 2018, at 4:43 AM, Jordan Borean wrote: > > Yes, DNS is what people normally use to resolve hostnames to IP addresses. > -- > You received this message because you are subscribed to a topic in the Googl

Re: [ansible-project] Digest for ansible-project@googlegroups.com - 11 updates in 7 topics

2018-03-14 Thread 'Larry Pescatore' 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 Wed, Mar 14, 2018 at 9:40 AM, wrote: > ansible-project@googlegr

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

2018-01-25 Thread 'Larry Pescatore' via Ansible Project
Looks like the become works! However, the syntax needs to be in this case: win_command: 'cmd.exe /c "start C:\cygwin\bin\bash -li /cygdrive/c/TEMP/chmod.sh"' become: yes become_method: runas become_user: SYSTEM I appreciate your help! I have like 4 or 5 scripts that I need elevation to r

Re: [ansible-project] chmod not working

2018-01-03 Thread 'Larry Pescatore' via Ansible Project
Wow, that's something HOPEFULLY will be supported in the future. Thank you. On Wed, Jan 3, 2018 at 3:05 PM, Matt Martz wrote: > From what I can tell of the documentation, `win_copy` does not support a > `mode` argument. It's likely just being ignored, due to how the argument > parsing in window

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

2017-12-22 Thread 'Larry Pescatore' via Ansible Project
Thank you sir, the last command worked, though win_shell did not. Follow up: what is the switch to run cmd.exe AS ADMINISTRATOR? On Thu, Dec 21, 2017 at 4:24 PM, Jordan Borean wrote: > You can try just running the gcloud executable by itself to make things > simpler like so > > - win_command: gc

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

2017-11-16 Thread 'Larry Pescatore' via Ansible Project
I got it to work by using: - name: Create C:\TEMP directory win_file: path='C:\TEMP' state=directory - name: VS2015 | Download Visual Studio Professional With Updates 2015 Setup win_get_url: url: 'url' ' dest: 'C:\TEMP\vs_pro.exe' - name: VS2015 | I

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

2017-11-09 Thread 'Larry Pescatore' via Ansible Project
And thank you to everyone else that contributed! On Thu, Nov 9, 2017 at 1:38 PM, Larry Pescatore wrote: > Jordan, > You're a genius, it worked like a charm. > Thanks! > > On Thu, Nov 9, 2017 at 12:15 PM, Jordan Borean > wrote: > >> I don't think win_shell is necessary, you are truly trying to r

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

2017-11-09 Thread 'Larry Pescatore' via Ansible Project
Jordan, You're a genius, it worked like a charm. Thanks! On Thu, Nov 9, 2017 at 12:15 PM, Jordan Borean wrote: > I don't think win_shell is necessary, you are truly trying to run an > executable and don't want to confuse issues that may be related to how the > shell handles things and how a comm

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

2017-11-09 Thread 'Larry Pescatore' via Ansible Project
BTW here is my version. root@Raspi_Ctrl:/ansible/playbook# ansible --version ansible 2.5.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/pyt

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

2017-11-09 Thread 'Larry Pescatore' via Ansible Project
Hi Jordan, I created a new play based on your comment. --- - hosts: builders become: true tasks: -name: Install Cygwin win_command: C:\Users\pkmbuilder\Desktop\setup-x86_64.exe --root C:\cygwin64 --quiet-mode --site http://cygwin.mirror.constant.com --packages "openssh,rsync,z

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

2017-11-08 Thread 'Larry Pescatore' via Ansible Project
I shuld also note I tried putting that path in to the batch file. On Wed, Nov 8, 2017 at 2:20 PM, Larry Pescatore wrote: > Hi Jordan, > The setup file is in C:\Users\user\Desktop. > The batch has the right path. > I just dont know why it's not working. > > On Wed, Nov 8, 2017 at 2:18 PM, Jordan

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

2017-11-08 Thread 'Larry Pescatore' via Ansible Project
Hi Jordan, The setup file is in C:\Users\user\Desktop. The batch has the right path. I just dont know why it's not working. On Wed, Nov 8, 2017 at 2:18 PM, Jordan Borean wrote: > Where is the setup-x86_64.exe located? By default commands run from > win_command and win_shell are run in the user's

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

2017-11-08 Thread 'Larry Pescatore' via Ansible Project
Hi zimidar...@gmail.com Here is the verbose output root@Raspi_Ctrl:/ansible/playbook# ansible-playbook batch.yml - -i /ansible/hosts ansible-playbook 2.5.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plu

Re: [ansible-project] vault question

2017-11-01 Thread 'Larry Pescatore' via Ansible Project
Or, I guess is it possible to have it pull from a file to avoid having to use the --vault-id command in my ad hoc? On Wed, Nov 1, 2017 at 12:10 PM, Larry Pescatore wrote: > Oleg, thanks. > So, would I put 'vault-id /ansible/vault/file' in the hosts file? > Because right now, the password is the

Re: [ansible-project] vault question

2017-11-01 Thread 'Larry Pescatore' via Ansible Project
Oleg, thanks. So, would I put 'vault-id /ansible/vault/file' in the hosts file? Because right now, the password is there in the hosts file in the vars. If I encrypt the hosts file, ping fails. On Wed, Nov 1, 2017 at 2:44 AM, 'Oleg Gerasymchuk' via Ansible Project < ansible-project@googlegroups.com

Re: [ansible-project] Having issue finding my hosts

2017-10-30 Thread &#x27;Larry Pescatore&#x27; via Ansible Project
Hi Zimidar, For windows you have to use win_command it seems. This playbook worked perfectly (I copied the file in another play): --- - name: test script module hosts: windows tasks: - name: run simple script win_command: C:\Users\yrunner\Desktop\file.bat On Mon, Oc

Re: [ansible-project] Having issue finding my hosts

2017-10-27 Thread &#x27;Larry Pescatore&#x27; via Ansible Project
HI Jordan, Thanks for your help. I've got it running now successfully. I have copied over a bat file successfully several times. Now, my next step is trying to get the batch files to run via ansible. This is my play: --- - hosts: nuc - name: run simple script script: C:\Users\YRunner\Desktop\

Re: [ansible-project] Having issue finding my hosts

2017-10-26 Thread &#x27;Larry Pescatore&#x27; via Ansible Project
Hi Jordan, What I have per your advice is : playbook: -- - name: Copies file to Windows win_copy: src: /ansible/ansible.cfg dest: C:\Users\YRunner\Desktop\test1 Then I run it and get: --- root@Raspi_Ctrl:/ansible# ansible-playboo

Re: [ansible-project] Having issue finding my hosts

2017-10-26 Thread &#x27;Larry Pescatore&#x27; via Ansible Project
Thank you. It worked once: root@Raspi_Ctrl:/ansible/playbook# nano test.yml root@Raspi_Ctrl:/ansible/playbook# ansible-playbook /ansible/playbook/test.yml -i /ansible/hosts PLAY [nuc] * TASK [Gathering Facts] ***