[ansible-project] Using the wait_for module to check ports from one windows host to another windows host

2018-03-07 Thread marcalfa1
Not sure if i'm using the wait_for module correctly on two windows host. I'm getting the error below when trying to check if a port is open from a source windows host to a target windows host. Wondering if i'm using the module correctly or if this even possible when both hosts are windows. I'v

[ansible-project] Re: Firewall Rules Check with Ansible

2018-02-25 Thread marcalfa1
match supplied host pattern, ignoring: HOST1 PLAY [HOST1] skipping: no hosts matched On Thursday, February 22, 2018 at 4:26:38 PM UTC-5, marcalfa1 wrote: > > I have a firewall with about 50 rules and constantly growing. Is there a &

Re: [ansible-project] Firewall Rules Check with Ansible

2018-02-24 Thread marcalfa1
s there an example that shows how this playbook should look like. Thanks in advance. -mm On Thursday, February 22, 2018 at 5:00:54 PM UTC-5, Kai Stian Olstad wrote: > > On Thursday, 22 February 2018 22.26.38 CET marcalfa1 wrote: > > I have a firewall with about 50 rules and constant

[ansible-project] Re: Firewall Rules Check with Ansible

2018-02-24 Thread marcalfa1
On Thursday, February 22, 2018 at 4:26:38 PM UTC-5, marcalfa1 wrote: > > I have a firewall with about 50 rules and constantly growing. Is there a > way I can create a playbook to test whether a source host can connect to a > destination host on a specific port? > If that is

[ansible-project] Firewall Rules Check with Ansible

2018-02-22 Thread marcalfa1
I have a firewall with about 50 rules and constantly growing. Is there a way I can create a playbook to test whether a source host can connect to a destination host on a specific port? If that is possible I can create a playbook similar to my firewall rules so next time we make a change to the f

[ansible-project] winrm or requests is not installed: No module named winrm

2017-12-11 Thread marcalfa1
Has anyone properly documented the correct packages that needs to be installed to manage a windows host? ansible 2.4.1.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python

[ansible-project] Re: win_shell - What's the proper way to use a command with a flag in ansible playbook or adhoc command.

2017-10-12 Thread marcalfa1
Jordan, The solutions you've provided worked out fine. I ended up using *win_shell* module simply because I was not able to pass *%computername%* variable in win_find patterns. I'm a beginner and ready to tackle regex :-) I really appreciate your help. Also, by any chance the values in result

[ansible-project] Re: win_shell - What's the proper way to use a command with a flag in ansible playbook or adhoc command.

2017-10-11 Thread marcalfa1
The error was: 'item' is undefined\n\nThe error appears to have been in '/home/vagrant/ansible/find-copy-test.yml': line 12, column 6, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: get the files\n

[ansible-project] win_shell - What's the proper way to use a command with a flag in ansible playbook or adhoc command.

2017-10-11 Thread marcalfa1
Trying to "dir /b c:\Temp" using a playbook or via adhoc and getting the error message below. It seems to have a problem with "/b" in "Dir /b C:\Temp" *- hosts: all gather_facts: yes tasks: - win_shell: dir /b C:\Temp* FAILED! => {"changed": true, "cmd": "dir /b C:\\Temp", "delta":

[ansible-project] Find and Fetch Files on Windows Hosts to Ansible Controller

2017-10-10 Thread marcalfa1
I'm trying to find a few file patterns from a few windows hosts and copy those files to my ansible controller. Can some help me with the error message below. I can't seem to figure out what I'm doing wrong. ERROR! Syntax Error while loading YAML. The error appears to have been in '/home/

[ansible-project] win_find: What am I doing wrong here? I'm following the exact syntax from ansible document

2017-10-09 Thread marcalfa1
*ERROR! 'paths' is not a valid attribute for a Task* *The error appears to have been in '/home/vagrant/ansible/win-find.yml': line 6, column 5, but maybe elsewhere in the file depending on the exact syntax problem.* *The offending line appears to be:* * - win_find:^ here* [vm1 ansibl