Re: [ansible-project] Ansible ping report

2023-11-08 Thread Thanh Nguyen Duc
You may try the attached playbook i am using for linux, windows will be similar as well. The report will be in html format Vào Th 4, 8 thg 11, 2023 vào lúc 22:22 Dimitri Yioulos < dimitri.g.yiou...@gmail.com> đã viết: > Vladimir, this is very good, and very appreciated. Your playbook looks for

Re: [ansible-project] Running update grub-pc in noninteractive mode

2023-10-23 Thread Thanh Nguyen Duc
- > /dev/sda, dev/nvme0n1p1, etc. > > On Mon, Oct 23, 2023 at 6:36 AM Thanh Nguyen Duc < > ng.ducthanh1...@gmail.com> wrote: > >> You may try to gather fact, register the fact then execute the command in >> the next task. For me i usually use shell to query what i n

Re: [ansible-project] Running update grub-pc in noninteractive mode

2023-10-23 Thread Thanh Nguyen Duc
You may try to gather fact, register the fact then execute the command in the next task. For me i usually use shell to query what i need before proceeding next step, save a bit of time. --- Example: --- - name: Set location hosts: localhost connection: local gather_facts: false tasks:

Re: [ansible-project] Mail module - multiple tabs in csv file

2023-08-09 Thread Thanh Nguyen Duc
coming in advance level.It looks like big task. I will wait anyone suggest us more better wayOn Wed, 9 Aug 2023, 17:15 Thanh Nguyen Duc, <ng.duct...@gmail.com> wrote:Hope can help. I am not python programmer so code may not clean.from ansible.module_utils.basic import *import sysimport osimpo

Re: [ansible-project] Mail module - multiple tabs in csv file

2023-08-09 Thread Thanh Nguyen Duc
of each csv) will be formattedtype: boolean required: truesummary_csv_list:description: List of csv files inserted in the first sheet(s) of the workbooktype: listrequired: falseformat_error description: high light the keyword in redtype: listrequired: falseformat_correct description: high light the keyw

Re: [ansible-project] Mail module - multiple tabs in csv file

2023-08-09 Thread Thanh Nguyen Duc
Csv i don’t think have multiple tabs. I have done with excel instead. You can use j2 template to create a csv then python to consolidate them to 1 file.On 9 Aug 2023, at 17:55, Aharonu wrote:Hi Todd and Team,Could you please help one below query? Thank you.Example, I have  file1.csv creates

Re: [ansible-project] Re: Failed to install package NTP

2023-07-23 Thread Thanh Nguyen Duc
Try it locally by command: yum install ntpd or chrony or dnf install chrony ansible just help you to install it remotely. The error come from your local host.On 23 Jul 2023, at 22:36, arjungoel 1995 wrote:I have tried Chrony as well but same issue persists.On Sun, Jul 23, 2023 at 1:15 AM Todd

Re: [ansible-project] Unable to use python 3

2023-07-03 Thread Thanh Nguyen Duc
I may install python3, create a virtual env and install my ansible-core there then symbol link to the actual os  Sent from my iPhone > On 4 Jul 2023, at 08:45, Nico Kadel-Garcia wrote: > > On Fri, Jun 30, 2023 at 11:42 AM cool prat wrote: >> >> Hi @Nico Kadel-Garcia, >> >> Thanks for

Re: [ansible-project] separate logfile per target

2023-06-30 Thread Thanh Nguyen Duc
You may create a log file with hostname, in my case i will create a log file with name: {{inventory_hostname}}_log.xx then pull them back. Vào Th 6, 30 thg 6, 2023 vào lúc 14:54 dulhaver via Ansible Project < ansible-project@googlegroups.com> đã viết: > we where wondering whether there is a

Re: [ansible-project] Ssh connectivity issues with ad-hoc commands, playbooks.yml, Ansible.

2023-06-15 Thread Thanh Nguyen Duc
Need to specify your target ssh user.On 15 Jun 2023, at 12:30, Prady A wrote:You are running the script from root user. So it is trying to connect root@ip not administrator@ipOn Thu, Jun 15, 2023 at 0:58, gonzalo diaz larenas wrote:DearGood afternoon, sorry for the

Re: [ansible-project] ansible cannot log into server, yet I can ssh in manually

2023-06-12 Thread Thanh Nguyen Duc
same user in my ansible hosts file as when I ssh in.On Monday, June 12, 2023 at 6:23:23 AM UTC-4 Thanh Nguyen Duc wrote:Are you using key authentication or password authentication? what is the secure log in your target machine? how did you configure it?Vào Th 2, 12 thg 6, 2023 vào lúc 18:17 Kat

Re: [ansible-project] ansible cannot log into server, yet I can ssh in manually

2023-06-12 Thread Thanh Nguyen Duc
Are you using key authentication or password authentication? what is the secure log in your target machine? how did you configure it? Vào Th 2, 12 thg 6, 2023 vào lúc 18:17 Kathy L đã viết: > As the title says, I am trying to run an ansible playbook against 10 > hosts. All 10 fail stating

Re: [ansible-project] install vmware tools via ansible playbook (winrm)

2023-03-10 Thread Thanh Nguyen Duc
Does command work locally? If can then you may try to create a bat file then trigger it instead?Thanks and Best Regards,Thanh.On 11 Mar 2023, at 07:29, Will McDonald wrote:It's hard to tell from the mail formatted commands but thoughts off the top of my head:1. /S /v"/qn looks like it might need

Re: [ansible-project] Resizing the Vmware VMDK Through Ansible script

2023-02-14 Thread Thanh Nguyen Duc
I don’t think vmware support to resize the disk by decrease the volume size directly. Likely the disk shrink already removed some file systems from OS and cause the OS not able to boot up. Thanks and Best Regards,Thanh.On 14 Feb 2023, at 15:30, Duy Huynh Đỗ wrote: Dear Abhijeet Kasurde,Thanks a

Re: [ansible-project] Identify most recent directory in a directory.

2022-12-22 Thread Thanh Nguyen Duc
I don’t think you can achieve what you want if the file keep generating. Ansible is not real time monitor/scanning. The most recently at the point of time when you trigger only. Thanks and Best Regards, Thanh. > On 23 Dec 2022, at 11:55, Nico Kadel-Garcia wrote: > > On Thu, Dec 1, 2022 at

Re: [ansible-project] Identify most recent directory in a directory.

2022-12-01 Thread Thanh Nguyen Duc
Is it the shell script also be triggered via ansible? If yes then you can register the path and work with it later. If not then do you know roughly when script be triggered then can just use shell command to find the directory with created date. Sent from my iPhone > On 2 Dec 2022, at 05:57,

Re: [ansible-project] Winrm configuration issue

2021-07-22 Thread Thanh Nguyen Duc
? > > Regards, > > JYL > > > > Le 22/07/2021 à 12:09, Thanh Nguyen Duc a écrit : >> Hi >> >> I have tried to reset password, telnet to client. All ok. Even tried to use >> the service account to login server locally and successful. >> >>

Re: [ansible-project] Winrm configuration issue

2021-07-22 Thread Thanh Nguyen Duc
d check port on server also validate > connectivity work from controller server > > Regards > Kundan singh > >> On Thu, Jul 22, 2021, 2:13 PM Thanh Nguyen Duc >> wrote: >> Hi experts, >> >> I have an ansible server managing a lot of windows serve

Re: [ansible-project] Winrm configuration issue

2021-07-22 Thread Thanh Nguyen Duc
Hi Antony, Sorry, i have attached the text file. Thanks and Regards, Thanh. Vào Th 5, 22 thg 7, 2021 vào lúc 16:47 Antony Stone < antony.st...@ansible.open.source.it> đã viết: > On Thursday 22 July 2021 at 10:43:35, Thanh Nguyen Duc wrote: > > > Hi experts, > > >

Re: [ansible-project] Based on vendor have to execute playbook

2021-06-16 Thread Thanh Nguyen Duc
You can see the vendor when gather facts and set condition when vendor = hp Sent from my iPhone > On 17 Jun 2021, at 08:32, Wei-Yen Tan wrote: > >  > Use conditionals as in when > > Get Outlook for iOS > From: ansible-project@googlegroups.com on > behalf of NAVEEN > Sent: Thursday, June

Re: [ansible-project] Ping Host from Ansible Server

2021-06-16 Thread Thanh Nguyen Duc
For windows and linux, i have created a playbook to run everyday at 1am to check whether the host is reachable or not and data will be written to jinja template with html format for the final report. Sent from my iPhone > On 16 Jun 2021, at 23:53, Brian Coca wrote: > > for network

Re: [ansible-project] docker installation problems

2021-04-26 Thread Thanh Nguyen Duc
Sorry, it should be become: true By default it will elevate the account to root. You may need to pass become_user_pass as well. Sent from my iPhone > On 26 Apr 2021, at 18:30, rebecca acheampong wrote: > > I just added become_user: root but the same problem > >> On Monday, April 26, 2021 at

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Did you execute your playbook with sudo? If with sudo then you may need to ssh copy key again for root account to target machine. And Can try to add - then post the result? Sent from my iPhone > On 26 Apr 2021, at 18:37, Hasini P wrote: > >  > yes, I am able to ping-pong with my

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Sorry, first of all, are you able to ping your server by ansible yourserver -m ping? Have you done to transfer your public key to client? Sent from my iPhone > On 26 Apr 2021, at 18:32, Hasini P wrote: > > Thanks, I tried different possibilities including your suggestion as below., > but it

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Sorry, just become: true may solve, by default it always become root already Sent from my iPhone > On 26 Apr 2021, at 18:29, Thanh Nguyen Duc wrote: > > I think just become_user: yes may solve your issue. > > Sent from my iPhone > >>> On 26 Apr 2021

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
I think just become_user: yes may solve your issue. Sent from my iPhone > On 26 Apr 2021, at 18:26, Hasini P wrote: > >  > Team, Can someone sort this out please.. We are using 2.8.18 version of > ansible on our control node. > I am facing error when trying to perform ping-pong with

Re: [ansible-project] docker installation problems

2021-04-26 Thread Thanh Nguyen Duc
Look like you need to add become_user option there Sent from my iPhone > On 26 Apr 2021, at 18:21, rebecca acheampong wrote: > > I am using ansible to install a docker but I get this error. How can i solve > this please? > Please help me, this installation has taken me a whole week > >

Re: [ansible-project] Re: Windows machine not pinging.

2020-10-13 Thread Thanh Nguyen Duc
You are using domain account or local account? Vào Th 2, 12 thg 10, 2020 vào lúc 17:18 uday kiran đã viết: > But the credentials are correct. > > On Saturday, 10 October 2020 at 05:25:37 UTC+5:30 jbor...@gmail.com wrote: > >> The ping and win_ping modules aren't doing an ICMP ping, they are

Re: [ansible-project] ansible tower - command works BUT playbook fails to connect to the host via ssh

2020-06-12 Thread Thanh Nguyen Duc
Try to run with sudo? Sent from my iPhone > On Jun 12, 2020, at 23:55, Stefan Hornburg (Racke) wrote: > > On 6/12/20 5:31 PM, Laci wrote: >> In my ansible tower I can execute a command successfully on a remote server, >> however when I try to run a playbook I get: >> >> { >> "msg":

Re: [ansible-project] Need some data filter from meta data which came from custom module.

2020-04-16 Thread Thanh Nguyen Duc
Seem like you can register the result result and extract only the meta: register: result debug: var: result.meta Anyway, you must see how is the data your module return:) Sent from my iPhone > On Apr 16, 2020, at 20:29, Venu Devannagari wrote: > >  > I am getting following output from

Re: [ansible-project] "Win_Command" module not working to connect localhost to run Powershell script from ansible which is installed in windows10

2020-04-16 Thread Thanh Nguyen Duc
Localhost is your ansible server and it doesn’t work with windown module, you need to specify the client group name Sent from my iPhone > On Apr 16, 2020, at 16:59, Pavan K Kumar wrote: > >  > Hello Experts, > > > > I'm new to Ansible and PowerShell. > > > > I have installed cygwin in

Re: [ansible-project] Re: Error message - "module_stderr": "/bin/sh: 1: powershell: not found\n", when running a powershell through win_command

2020-04-16 Thread Thanh Nguyen Duc
Why localhost? Localhost mean you are running it in the ansible server, not win 10 client Sent from my iPhone > On Apr 16, 2020, at 17:04, Pavan K Kumar wrote: > >  > Hi Kiran, > > Did you got any fix for this ? > > im also facing the same issue.. > >> On Sunday, February 23, 2020 at

[ansible-project] Manage Windows Patching with Ansible

2020-04-12 Thread Thanh Nguyen Duc
Currently, i am setting up an Ansible Engine server to manage the Window Patching in my test environment, i tried with the attached playbook but somehow ansible not able to complete it and always stuck at: META: ran handlers My playbook: --- - name: Set location hosts: localhost