[ansible-project] host file doesn't read variable for windows

2020-07-23 Thread Work-Hard
Hello, my host file for ansible is not reading additional variables. Following is my *host file:* [ubuntu] [amazonlinux2] [database] [windows] [windows:vars] ansible_connection = winrm ansible_ssh_port = 5986 ansible_winrm_transport = kerberos ansible_winrm_server_cert_validation = ignore

[ansible-project] Re: Which module can I use to run command on command prompt on all my hosts ?

2020-06-01 Thread Work-Hard
Thank you for explaining. It is very helpful! Cheers, On Monday, June 1, 2020 at 11:58:15 AM UTC-7, Nick Schendel wrote: > > Since you mentioned gpupdate, then I assumed windows. Ultimately the best > place to look to figure out what you can use is to search the all module > index: > >

[ansible-project] Which module can I use to run command on command prompt on all my hosts ?

2020-06-01 Thread Work-Hard
Hi, Which module can I use as a task to run a command on the command prompt on all my hosts? example - cmd: gpupdate/force Thanks, -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Unable to run command on windows. Please explain!

2020-05-29 Thread Work-Hard
Hi, I am unable to run command and throws an error. What am I doing wrong? Please explain! Thanks "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "module_stderr": "Exception calling \"Create\" with \"1\" argument(s): \"At line:4

Re: [ansible-project] If unreachable - stop giving Failed out and move to next host

2020-05-11 Thread Work-Hard
cript-example-aws-ec2 > > > > On Fri, 8 May 2020 at 23:09, Work-Hard > > wrote: > >> Hi Dick, >> I just to make sure on your suggestion that I have over 100 hosts that >> brought up and down dynamically. My goal is that the tasks should stop >> r

Re: [ansible-project] If unreachable - stop giving Failed out and move to next host

2020-05-08 Thread Work-Hard
AM UTC-7, Dick Visser wrote: > > You could use the ec2.py dynamic inventory to at least target the > instances that are powered on. It's more elegant than ignoring errors etc > > On Fri, 8 May 2020 at 17:45, Work-Hard > > wrote: > >> Brian if I remove ignore_unreac

Re: [ansible-project] If unreachable - stop giving Failed out and move to next host

2020-05-08 Thread Work-Hard
Brian if I remove ignore_unreachable=true. The playbook halts to continue the playbook. On Friday, May 8, 2020 at 7:47:19 AM UTC-7, Brian Coca wrote: > > if you want to stop that ... dont use ignore_unreachable=true, the > 'default' behaviour is to remove the host from play and not try >

Re: [ansible-project] If unreachable - stop giving Failed out and move to next host

2020-05-08 Thread Work-Hard
They are either off or unreachable over VPN. This is from production. On Thursday, May 7, 2020 at 3:28:33 PM UTC-7, Dick Visser wrote: > > Out of interest - what is the reason they are unreachable? > > On Fri, 8 May 2020 at 00:17, Work-Hard > > wrote: > > >

[ansible-project] If unreachable - stop giving Failed out and move to next host

2020-05-07 Thread Work-Hard
Hi, Is it possible for the host that if it's unreachable - stop giving Failed output and move to the next task. As of now, it just shows the output fails. --- - hosts: amazonlinux2 become: true serial: 1 max_fail_percentage: 0 ignore_errors: true gather_facts: false

[ansible-project] Re: Target machines are unreachable

2020-05-05 Thread Work-Hard
FAILED! => {"changed": false, "cmd": ["dpkg", "--configure", "a"], "delta": "0:00:00.064010", "end": "2020-05-06 01:18:35.173136", "msg": "non-zero return code", "rc": 1, "start": "2020-05-06 01:18:35.109126", "stderr": "dpkg: error processing package a (--configure):\n no package named 'a'

[ansible-project] Target machines are unreachable

2020-05-05 Thread Work-Hard
my target machines are up. I don't understand why I am running this error Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/setup.ps1 Pipelining is enabled. ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO fatal: []: UNREACHABLE! => { "changed": false,

[ansible-project] Is there a way we can delay the connection instead of unreachable

2020-04-05 Thread Work-Hard
Hello, ISSUE - Whenever a user in a company is not connected to the vpn; ansible fails the connection (as unreachable). Is there a way we can delay the connection for 20 days and have it keep trying every hour, instead of showing "unreachable"? REASON- I need the output to look clean when I

[ansible-project] Is there Module to output the playbook in specific directory for windows and linux hosts ?

2020-02-28 Thread Work-Hard
hello, Is there a Module to output the playbook in a specific directory for windows and Linux hosts? say - I want to output the result of the playbook in /etc/ansible/win-logs for windows and /etc/ansible/Linux-logs thanks -- You received this message because you are subscribed to the Google

[ansible-project] Re: Docker container is not starting on ubuntu 18.0 ver for ansible. Any idea?

2020-02-14 Thread Work-Hard
I was able to figure it ou "docker wasn't starting" systemctl start docker helped - if you're curious -- 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, send an email to

[ansible-project] Re: Docker container is not starting on ubuntu 18.0 ver for ansible. Any idea?

2020-02-14 Thread Work-Hard
this is a separate issue (Dick). it seems like when I upgraded to 18 from 16 ubuntu version. it broke and gave me the reporting error. Also, I deployed a new server from scratch with no issues. Any insights will help! > > thanks in advance! -- You received this message because you are

Re: [ansible-project] timout-playbook for ubuntu after reboot

2020-02-14 Thread Work-Hard
ike you do now. So what’s the reason you are not using the reboot module? > If possible please reply to this thread and don’t start yet another one. > > Thx! > > > On Thu, 13 Feb 2020 at 20:55, Work-Hard > wrote: > >> *Hi, can someone please explain why my playbook for instance

[ansible-project] Docker container is not starting on ubuntu 18.0 ver for ansible. Any idea?

2020-02-13 Thread Work-Hard
Docker container is not starting on ubuntu 18.0 ver for ansible. *Any idea?* *TASK [local_docker : Start the containers] fatal: [localhost]: FAILED!

[ansible-project] timout-playbook for ubuntu after reboot

2020-02-13 Thread Work-Hard
*Hi, can someone please explain why my playbook for instance timeout after a reboot:* /dev/null 2>&1 && sleep 0' The full traceback is: WARNING: The below traceback may *not* be related to the actual failure. File

[ansible-project] Playbook doesn't run completely stuck after "check if reboot required"

2020-02-12 Thread Work-Hard
*Playbook doesn't run completely stuck after "check if reboot required". Please assist!* *Play-Book* --- - hosts: ubuntu become: true any_errors_fatal: true serial: 1 max_fail_percentage: 0 vars: ansible_user: ubuntu tasks: # do an "apt-get update", to ensure latest package

[ansible-project] Re: how can i have my windows instances to use IP address instead of dns name?

2020-02-11 Thread Work-Hard
okay thank you On Monday, February 10, 2020 at 6:26:03 PM UTC-8, Jordan Borean wrote: > > Just set the connection to use IPs as you would Linux it should just work. > Without seeing the error that you are receiving we can't help you anymore. > The most common reason why it doesn't is if you are

[ansible-project] how can i have my windows instances to use IP address instead of dns name?

2020-02-10 Thread Work-Hard
Hello, how can i have my windows instances to use IP address instead of dns name? it works with my Linux instances but windows. -- 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

Re: [ansible-project] Re: Switch to root user using dzdo

2020-02-07 Thread Work-Hard
oh yea? how's that? Please do explain! On Friday, February 7, 2020 at 12:48:39 PM UTC-8, Dick Visser wrote: > > On Fri, 7 Feb 2020 at 21:17, Work-Hard > > wrote: > > > > as a workaround, you can change the file permission on linux to act as > root for your target

[ansible-project] Re: Switch to root user using dzdo

2020-02-07 Thread Work-Hard
as a workaround, you can change the file permission on linux to act as root for your target area. On Friday, February 7, 2020 at 2:45:02 AM UTC-8, Poemy wrote: > > I have an ansible playblook running some tasks for my user, which I log in > through ssh. > > The user has root privileges by

[ansible-project] Re: Anible windows script get stuck for my of my machine - Although reboot command is provided to reboot if required. any idea, why ?

2020-02-07 Thread Work-Hard
It's been a day by playbook is stuck. so stopped it and ran -vvv. it's showing the following* Output in a LOOP*. I am not sure why is stuck EXEC (via pipeline wrapper) win_updates: check win_updates results for automatic reboot: {"_ansible_parsed": true, "filtered_updates":

[ansible-project] Re: aws ec2 add new ebs volume error

2020-02-06 Thread Work-Hard
(ec2_vol) the module is not supported by anisble On Thursday, February 6, 2020 at 7:26:11 PM UTC-8, Sandy Hung wrote: > > Dear all: > > please help me thanks. > > - name: Create New EBS volume > ec2_vol: >aws_access_key: "{{ aws_access_key }}" >aws_secret_key: "{{

[ansible-project] Anible windows script get stuck for my of my machine - Although reboot command is provided to reboot if required. any idea, why ?

2020-02-06 Thread Work-Hard
*Ansible:- * --- - hosts: windows vars: ansible_connection: winrm ansible_ssh_port: 5986 anisble_winrm_transport: kerberos ansible_winrm_server_cert_validation: ignore validate_certs: false ansible_winrm_scheme: https ansibe_winrm_read_timeout_sec: 30 win_updates:

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Work-Hard
Thanks for the update. I was able to figure it out! -- 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, send an email to ansible-project+unsubscr...@googlegroups.com. To view

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Work-Hard
So, I am breaking it down in the playbook - *it doesn't like spaces in name of the package?* *playbook:* --- - hosts: amazonlinux2 become: true any_errors_fatal: true serial: 1 max_fail_percentage: 0 vars: ansible_user: ec2-user tasks: # do an "yum update", to ensure latest

[ansible-project] Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-04 Thread Work-Hard
Hello, Do you recommend Migrating playbook from ubuntu to amazon Linux 2 (as it uses *yum instead of apt*). If so, how can I check if missing add a package to a new instance to make sure it installs python-apt*?* *Ansible-Playbook* --- - hosts: amazonlinux2 become: true any_errors_fatal:

Re: [ansible-project] Error while readin split part for updating Ubuntu packages - Should I include the path of splitpath,py in playbook ?

2020-02-04 Thread Work-Hard
_lines | difference(['Listing...']) > | map('regex_replace', '^(.*?)\/(.*)', '\\1') | list }}" > > - debug: var=updates > > > On Tue, 4 Feb 2020 at 01:12, Work-Hard > > wrote: > > > > Hello, Please see below > > ansible.cfg > > [defaults] >

[ansible-project] Error while readin split part for updating Ubuntu packages - Should I include the path of splitpath,py in playbook ?

2020-02-03 Thread Work-Hard
*Hello, Please see below* *ansible.cfg* [defaults] inventory = ./hosts splitpart.py = /etc/ansible/splitpart.py/ *splitpart.py* def splitpart (value, index, char = ','): if isinstance(value, (list, tuple)): ret = [] for v in value: ret.append(v.split(char)[index])

[ansible-project] Re: please advise - Not generating logs after with ansible log_group

2020-02-03 Thread Work-Hard
Any updates are appreciated? On Friday, January 31, 2020 at 7:11:19 AM UTC-8, Work-Hard wrote: > > If you have an example for the playbook and other config to log > ansible-recap, please share > > On Thursday, January 30, 2020 at 4:12:52 PM UTC-8, Work-Hard wrote: >> >&

[ansible-project] Re: please advise - Not generating logs after with ansible log_group

2020-01-31 Thread Work-Hard
If you have an example for the playbook and other config to log ansible-recap, please share On Thursday, January 30, 2020 at 4:12:52 PM UTC-8, Work-Hard wrote: > > I am unable to generate logs with the playbook. Please advise? > > *ansible.cfg* > [defaults] > i

[ansible-project] please advise - Not generating logs after with ansible log_group

2020-01-30 Thread Work-Hard
I am unable to generate logs with the playbook. Please advise? *ansible.cfg* [defaults] inventory = ./hosts [callback_log_plays] log_folder = /var/log/ansible/hosts env:ANSIBLE_LOG_FOLDER *host file * [windows] windows mach...@abc.com [windows:vars] ansible_connection = winrm ansible_ssh_port

[ansible-project] Kerberos error

2020-01-30 Thread Work-Hard
I don;t know why i keep getting Kerberos error on every new machine, Any idea? HTTPSConnectionPool(host='workstation', port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',))",

[ansible-project] Re: Quick question- how to run ansible playbook on Saturday night at 12 PM and save the output in amazon s3 bucket

2020-01-29 Thread Work-Hard
sswordless ssh key or > set up ssh-agent ahead of time to work with cron, which can be a little > tricky. > > So, basically how you'd schedule any task, with extra attention paid to > the ssh auth. > > On Monday, January 27, 2020 at 11:08:26 PM UTC-8, Work-Hard wrote: &

[ansible-project] Re: Quick question- how to run ansible playbook on Saturday night at 12 PM and save the output in amazon s3 bucket

2020-01-28 Thread Work-Hard
Any update is appreciated! On Monday, January 27, 2020 at 11:08:26 PM UTC-8, Work-Hard wrote: > > Quick question- how to run ansible-playbook on Saturday night at 12 PM and > save the output in the amazon s3 bucket- "abc"? > -- You received this message because you are su

[ansible-project] Quick question- how to run ansible playbook on Saturday night at 12 PM and save the output in amazon s3 bucket

2020-01-27 Thread Work-Hard
Quick question- how to run ansible-playbook on Saturday night at 12 PM and save the output in the amazon s3 bucket- "abc"? -- 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,

[ansible-project] Re: What is the module to install drivers?

2020-01-24 Thread Work-Hard
changed - catagory_names to category_names.. Will try again but will the driver update ? please let me know On Friday, January 24, 2020 at 4:03:45 PM UTC-8, Work-Hard wrote: > > it's filtering now > vars : > win_updates: > - SecurityUpdates >

[ansible-project] Re: What is the module to install drivers?

2020-01-24 Thread Work-Hard
it's filtering now vars : win_updates: - SecurityUpdates - CriticalUpdates - UpdateRollups - Definition Updates - Updates - Windows Server 2016 - Windows Defender - Feature Packs - Silverlight - Upgrades - Windows 10 - Drivers

[ansible-project] What is the module to install drivers?

2020-01-24 Thread Work-Hard
What is the module to install drivers ? it's not working with win_updates. === "changed": false, "filtered_updates": { "3ae62049-cfd0-482e-b95b-e44f346aa156": { "categories": [ "Drivers" ],

Re: [ansible-project] Re: can someone please explain about "undefined" error

2020-01-24 Thread Work-Hard
Got it thanks On Friday, January 24, 2020 at 6:07:34 AM UTC-8, Karl Auer wrote: > > To expand on what Eric said: > > Your when: condition refers to a variable called "update_count". > > At the point where you refer to it, that variable does not exist. I bolded > the bits of the error message

[ansible-project] can someone please explain about "undefined" error

2020-01-23 Thread Work-Hard
Hello Guys, can someone please explain about "undefined" error Task - name: reboot if required win_reboot: when: update_count.reboot_required TASK [reboot if required]

Re: [ansible-project] Playbook is unable to install specified KB number updates but shows OK in playbook recap

2020-01-23 Thread Work-Hard
*Thank you, it worked* On Thursday, January 23, 2020 at 12:24:04 PM UTC-8, Jordan Borean wrote: > > Then finally for your last message, I've already told you in > https://groups.google.com/forum/#!topic/ansible-project/ME6fY1n7SCA why > it's failing the reboot check. > > Firstly > >1. The

[ansible-project] Re: Playbook is stuck, is it bug ?

2020-01-23 Thread Work-Hard
it took half an hour to run it and it's working normally now. Was it a BUG? On Thursday, January 23, 2020 at 4:33:06 PM UTC-8, Work-Hard wrote: > > *Hello guys,* > *My playbook seems to be stuck for 5 mins for 1 server. Is it bug ?* > tasks: >- name: Search and download

[ansible-project] Playbook is stuck, is it bug ?

2020-01-23 Thread Work-Hard
*Hello guys,* *My playbook seems to be stuck for 5 mins for 1 server. Is it bug ?* tasks: - name: Search and download Windows updates without installing them win_updates: category_names: - SecurityUpdates - CriticalUpdates - UpdateRollups -