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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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\
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
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]
***
20 matches
Mail list logo