Re: [ansible-project] Listing installed packages

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-14 19:21, lift...@gmail.com a écrit :

I know I can use the package_facts module to retrieve a list of
installed packages, but I'm having trouble formatting these.  I'd like
to format it similar to the following:

Package:   Version: 

Currently I'm doing the following (I'm showing only httpd but
ultimately I'd like to list out ALL installed packages:

---
- hosts: localhost
  become: true
  become_method: sudo
  gather_facts: no

  tasks:

  - name: Get installed packages
package_facts:
register: packages

  - name: Debug output

debug:
  msg: "{{ packages.ansible_facts.packages['httpd'] }}"

The debug print is giving me the following:

TASK [Debug output]
**
ok: [localhost] => {
"msg": [
{
"arch": "x86_64",
"epoch": null,
"name": "httpd",
"release": "97.el7_9",
"source": "rpm",
"version": "2.4.6"
}
]
}

Any ideas?

Thanks,
Harry


You can use templating to have it on one line...

But be careful :
- you can have more than one version of a package installed. Example: 
kernel
- you can have one x86_64 and one i686 or i386 version of a package 
installed


Regards,


--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c35818c74a992704b45ffa2bc82c755e%40lenhof.eu.org.


Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-14 14:14, dulhaver via Ansible Project a écrit :
On 10/14/2021 1:44 PM Sandip Bhattacharya 
 wrote:



On 14.10.21 11:49, dulhaver via Ansible Project wrote:
> I am running a playbook to install postgresql  
against a centos7 (python 2.75) target and am getting this error about a bad python 
interpreter .
>
> I try to solve this via the inventory.yml
>
> all:
>    hosts:
>      [hostname]: # centos7

Is this literally what is in your inventory.yaml file? Is that even 
valid yaml?

Shouldn't it be:

all:
   hosts:
 hostname: # centos7


this is my literal inventory file: https://paste.debian.net/1215386/
it works for other playbooks, it works for ad-hoc commands (where I
addresse a particular host from that group)


Did you surcharge the python interpreter variable in a config file ? 
(/etc/ansible.cfg, ~/.ansible.cfg, etc...)


See:
https://docs.ansible.com/ansible/latest/reference_appendices/config.html

Regards,

--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1a5189ff5c956aa7b82a6352ee28cc1a%40lenhof.eu.org.


Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-14 13:05, dulhaver via Ansible Project a écrit :
On 10/14/2021 12:59 PM 'Jean-Yves LENHOF' via Ansible Project 
 wrote:



Le 2021-10-14 12:56, dulhaver via Ansible Project a écrit :
> thx for the hint
>
>> On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Project
>>  wrote:
>>
>> Maybe something wrong with alternatives ?
>> > alternatives --list | grep -i python
>
> turns out empty.
>
> have tried to get something working with
>> alternatives --install /usr/bin/python python /usr/bin/python2.7
>
> (where /usr/bin/python is already a symlink to /usr/bin/python2 which
> is a symlink to /usr/bin/python2.7). It did not change anything
> though.
>
> probably it's my incompetence. I never heard about alternatives before
> (and don't really get it, as I thought the symlinks /usr/bin/python >
> /usr/bin/python2 > /usr/bin/python2.7) should be sufficient to guide
> anybody looking for python to the right executable. Neither do I get
> why all of a sudden a playbook requires this where opther playbooks
> running against the exact same host haven't.


Running from the same controller server with the same ansible version 
?


no, I ran all that on the target. doing that on the Ansible controller
server I get:

alternatives --list | grep python
python  manual  /usr/bin/python3
python3 auto/usr/bin/python3.6


That's not what I was asking... But you answer indirectly to one of my 
questions.

You have only one ansible controller as I understand.

You seems to say that there were some playbooks which works OK and some 
don't on the same targets.
Do you use the same ansible version for the the one which are OK and not 
OK ? There were some changes between versions of ansible for the python 
default interpreter search
Do you use the same inventory ? If not did you force the ansible python 
interpreter on one and not the other ?




Regards,

--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2a183e1d76dca48acb64c88e5695ecf9%40lenhof.eu.org.


Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-14 12:56, dulhaver via Ansible Project a écrit :

thx for the hint

On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Project 
 wrote:


Maybe something wrong with alternatives ?
> alternatives --list | grep -i python


turns out empty.

have tried to get something working with

alternatives --install /usr/bin/python python /usr/bin/python2.7


(where /usr/bin/python is already a symlink to /usr/bin/python2 which
is a symlink to /usr/bin/python2.7). It did not change anything
though.

probably it's my incompetence. I never heard about alternatives before
(and don't really get it, as I thought the symlinks /usr/bin/python >
/usr/bin/python2 > /usr/bin/python2.7) should be sufficient to guide
anybody looking for python to the right executable. Neither do I get
why all of a sudden a playbook requires this where opther playbooks
running against the exact same host haven't.



Running from the same controller server with the same ansible version ?

Regards,

--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1f0e8552caa6b1ddc9383ecc654a307f%40lenhof.eu.org.


Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-14 11:49, dulhaver via Ansible Project a écrit :

I am running a playbook to install postgresql [1] against a centos7
(python 2.75) target and am getting this error about a bad python
interpreter [2].

 I try to solve this via the inventory.yml

 all:
  hosts:
 [hostname]: # centos7
  ansible_host: my.domain.org
  ansible_user: username
  ansible_python_interpreter: /usr/bin/python

 (also tried interpreter_python: /usr/bin/python). the error remains
though

 funny fact ... I ran other playbooks successfully against the same
host before even without having specified any python interpreter.

 any ideas what may be going wrong here?





Hi,

Maybe something wrong with alternatives ?

alternatives --list | grep -i python


Regards,

--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bb6de9cb59fd3403fcedc2bf37eb7bdd%40lenhof.eu.org.


Re: [ansible-project] lvol module - depency problem parted/gparted

2021-10-12 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-12 14:50, dulhaver via Ansible Project a écrit :

> > On 10/12/2021 1:31 PM 'Jean-Yves LENHOF' via Ansible Project 
 wrote:
> >
> > parted package is available. You probably are doing something wrong
> > A "dnf update" and "dnf install parted" should work !

Alright, that might be the right push. Seems it could be a matter of 
enabled repos on the target. I guess I'll have to look at the 
`enablerepo` paramter in order to solve this


seems I can not get it working though


 tasks

  - name: install gparted & xfsprogs on target
dnf:
  name:
- parted
  enablerepo: rhel-8-for-x86_64-baseos-rpms
  state: present
become: yes

still does not seem to work "failures: No package parted available."
(and "rhel-8-for-x86_64-baseos-rpms" seems to be the repo needed)



Try using properties "update_cache" to "yes" for your dnf module use

Regards,

JYL


--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8c41dcb98b0c91120e4b8b7ae653f35e%40lenhof.eu.org.


Re: [ansible-project] lvol module - depency problem parted/gparted

2021-10-12 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-10-12 12:25, dulhaver via Ansible Project a écrit :

I have a task to resize a logical volume on a rhel8 target with the
lvol module.

 1. I get prompted 'Failed to find required executable parted'

 2. trying to install it with dnf module tells me 'parted does not
exist'

 3. trying gparted alternatively gives me a whole bndh of missing
dependencies

 msg: |-
Depsolve Error occured:
Problem: conflicting requests
- nothing provides libglibmm-2.4.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libsigc-2.0.so.0()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libgiomm-2.4.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libparted.so.2()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libparted-fs-resize.so.0()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides
libparted-fs-resize.so.0(LIBPARTED_FS_RESIZE_0.0.0)(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libatkmm-1.6.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libcairomm-1.0.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libgdkmm-3.0.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libgtkmm-3.0.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
- nothing provides libpangomm-1.4.so.1()(64bit) needed by
gparted-1.2.0-1.el8.x86_64
rc: 1
results: []

 my understanding was that gparted the gui version of parted (but that
easily might be worng understanding on my part)

 can anybody point out where I am taking a wrong turn here and push me
into the right direction?




parted package is available. You probably are doing something wrong
A "dnf update" and "dnf install parted" should work !


Regards,


--
Jean-Yves LENHOF

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c042920bf2e53c208bbf1b5a4c19e155%40lenhof.eu.org.


Re: [ansible-project] Custom facts written using resource module builder

2021-09-05 Thread 'Jean-Yves LENHOF' via Ansible Project

Show us the code and different results when it works and when it don't

Regards,

Le 05/09/2021 à 11:15, nitesh shet a écrit :

Hi,
I had written a custom facts for NTP server but it is acting weirdly 
everytime i run the facts module using playbook , sometimes values 
will come and sometimes not.
Can you please help me with this, is this the problem with builders or 
do i need to add a seperate class for connection?


Thanks,
Nitesh
--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPgfy9WpcjHFN-XfAgmPoR%3DZ0amF3ERX6-C-wENpdJV4C5Pg2Q%40mail.gmail.com 
.


--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bf12d53f-d566-6660-6b8e-dd143542c5a8%40lenhof.eu.org.


Re: [ansible-project] Permission Denied error

2021-09-03 Thread 'Jean-Yves LENHOF' via Ansible Project

Hi,

Look at your /etc/ansible.cfg $HOME/.ansible.cfg in your home or your 
inventories files, you probably surcharge ansible_ssh_common_args 
somewhere !


Regards,


Le 03/09/2021 à 16:43, aman kumar chagti a écrit :
I'm manually able to log in to target VM by password...but no thru 
ansible..even I tried to use the private key as well..but still the 
same issue coming up...


On Friday, September 3, 2021 at 8:10:49 PM UTC+5:30 aman kumar chagti 
wrote:


 PasswordAuthentication: is set to *yes*.. on both target and
controller servers. FYI
On Friday, September 3, 2021 at 8:08:50 PM UTC+5:30 aman kumar
chagti wrote:

on the target server or on controller server??

On Friday, September 3, 2021 at 7:54:28 PM UTC+5:30
e.ht...@gmail.com wrote:

Verify if PasswordAuthentication is set to yes in the
/etc/ssh/sshd_config and restart the sshd service on the
managed node.

On Fri, Sep 3, 2021, 3:07 PM aman kumar chagti
 wrote:

hi, I used - option, and I found something
.
/SH: EXEC ssh -vvv -C -o ControlMaster=auto -o
ControlPersist=60s -o KbdInteractiveAuthentication=no
-o

PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
/-o PasswordAuthentication=no/-o 'User="seconize"' -o
ConnectTimeout=10 -o
ControlPath=/home/wyxadministrator/.ansible/cp/68474f4208
x.y.z.x '/bin/sh -c '"'"'echo ~hello && sleep 0'"'"'' /



--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a191df15-164d-151d-98d7-4acc25272ed7%40lenhof.eu.org.


Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project

The ssh test you made is using the ansible controller server ?

Are you sure you are using the good ansible user on the target host ? 
(-u parameter for ansible-playbook)


Regards,

JY

Le 02/09/2021 à 14:48, aman kumar chagti a écrit :

yes, sshpass is inistalled


On Thursday, September 2, 2021 at 6:06:44 PM UTC+5:30 
jyle...@gmail.com wrote:


If you want password authentication, you need sshpass on your
ansible controller server. Did you install it ?

Regards,

JYL


Le 02/09/2021 à 13:55, aman kumar chagti a écrit :

when I try to run the playbook on a remote VM using
password-based  authentication, I'm getting the following error:
*fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg":
"Failed to connect to the host via ssh: x...@X.X.X.X: Permission
denied (publickey,password).", "unreachable": true}
*user and password are present in the inventory file.
but when I try to connect to the VM manually by SSH and using
that same password: I'm able to log it. Can anyone figure the
solution?
-- 
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-proje...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/ansible-project/622ba01f-b89b-49f0-91e2-319f6daee852n%40googlegroups.com

.


--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/72ef230c-8b8b-4ef8-a03a-3d897e356235n%40googlegroups.com 
.


--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/76647214-101b-8f34-7161-02ea3d48e5ea%40lenhof.eu.org.


Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project



Le 02/09/2021 à 14:53, aman kumar chagti a écrit :

@jyle if sshpass needs to be installed on target VM as well??



Nope, only on server side

Regards,


JYL

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7bc2b31f-35f1-2aac-b03f-18a32defded7%40lenhof.eu.org.


Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
If you want password authentication, you need sshpass on your ansible 
controller server. Did you install it ?


Regards,

JYL


Le 02/09/2021 à 13:55, aman kumar chagti a écrit :
when I try to run the playbook on a remote VM using password-based  
authentication, I'm getting the following error:
*fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg": "Failed 
to connect to the host via ssh: x...@X.X.X.X: Permission denied 
(publickey,password).", "unreachable": true}

*user and password are present in the inventory file.
but when I try to connect to the VM manually by SSH and using that 
same password: I'm able to log it. Can anyone figure the solution?

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/622ba01f-b89b-49f0-91e2-319f6daee852n%40googlegroups.com 
.


--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f3cb0095-e9f5-3344-0584-1e131fc25557%40lenhof.eu.org.


Re: [ansible-project] Winrm configuration issue

2021-07-22 Thread 'Jean-Yves LENHOF' via Ansible Project

Hi,

Is the account local and your GPO (seems that there are some) does'nt 
allow to log in with this account remotely ?


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.


Thanks and Regards,

Thanh.

Sent from my iPhone


On 22 Jul 2021, at 17:49, Kundan Singh  wrote:


Please try reseting password and 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 
mailto:ng.ducthanh1...@gmail.com>> wrote:


Hi experts,

I have an ansible server managing a lot of windows servers.
Recently I encountered an issue with a few client with the error
below.

-- 
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 this discussion on the web visit

https://groups.google.com/d/msgid/ansible-project/696E3CDB-CFCA-4298-9765-CA4589D5B258%40gmail.com

.


I have tried many things like verify the cert with wirm, compare
tls, ssl… but no difference with the working one. All look good.
Hope someone encountered it before and manage to solve it

-- 
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 this discussion on the web visit

https://groups.google.com/d/msgid/ansible-project/696E3CDB-CFCA-4298-9765-CA4589D5B258%40gmail.com

.


Thank you so much for your advice in advance.

Best Regards,

Thanh.

-- 
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 this discussion on the web visit

https://groups.google.com/d/msgid/ansible-project/696E3CDB-CFCA-4298-9765-CA4589D5B258%40gmail.com

.

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADGcVU3fVVpibb70zN3BFXVYCfvS%3DVm0v%2BDoxCM1rvx4Jd5nfA%40mail.gmail.com 
.

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/B5563EC8-D0BE-40BA-AB69-C61D55655EBD%40gmail.com 
.


--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c6955ad2-bb63-4724-d26f-eaaccaefce30%40lenhof.eu.org.


[ansible-project] Re: Install a french version of SQLServer on an english windows server with ansible

2021-06-26 Thread 'Jean-Yves LENHOF' via Ansible Project

Le 2021-06-24 19:08, Jean-Yves LENHOF a écrit :

Hi,


I try to silently install a french version of SQLServer (this is not
my idea, it's become this is the licensed version we have) with
ansible using some code like this (I already installed MUI French lang
pack via ansible) :

- name: "Change LANG"
  win_shell: |
Set-WinUILanguageOverride -Language fr-FR

- name: "Silent Install of SQL Server 2019"
  win_shell: |
D:\SETUP.EXE
/ConfigurationFile=c:\Windows\ansible_SQLSERVER2019_EXPRESS_ConfigurationFile.ini
/SAPWD=MySuperPassw0rd /IAcceptSQLServerLicenseTerms

But it keeps saying that there's something wrong with my language...

fatal: [myserver]: FAILED! => {
"changed": true,
"cmd": "D:\\SETUP.EXE
/ConfigurationFile=c:\\Windows\\ansible_SQLSERVER2019_EXPRESS_ConfigurationFile.ini
/SAPWD=MySuperPassw0rd /IAcceptSQLServerLicenseTerms",
"delta": "0:00:00.531238",
"end": "2021-06-24 04:13:53.809159",
"msg": "non-zero return code",
"rc": 1,
"start": "2021-06-24 04:13:53.277921",
"stderr": "",
"stderr_lines": [],
"stdout": "This SQL Server setup media does not support the
language of the OS, or does not have the SQL Server English-language
version installation files.  Use the matching language-specific SQL
Server media; or install  both the language specific MUI and change
the format and system locales through the regional settings in the
control panel.\r\n\r\n\r\n\r\n",
"stdout_lines": [
"This SQL Server setup media does not support the language of
the OS, or does not have the SQL Server English-language version
installation files.  Use the matching language-specific SQL Server
media; or install  both the language specific MUI and change the
format and system locales through the regional settings in the control
panel.",
"",
"",
""
]
}

But If I'm connecting on the server the UI Lang is changed to French
(so this part seems to work) and if I run the command line on
powershell it succeed.
On Linux I would have just surcharged LANG parameter before my command
but on windows, I think this is not possible...

Is there's something on ansible which force the language to english ?
If not, is someone has an idea on what's going on...

Thanks


Regards,



Fucking off Windows !

Little followup, because that was a quite difficult one to found.
It seems that windows does'nt directly changed tue UI Language when we 
do it programmatically the configuration is pending an interactive 
connection to that user make actually the change
Here's the registry key difference I found (note the pending in the 
entry) :


Control Panel\Desktop

-"PreferredUILanguages"=hex(7):66,00,72,00,2d,00,46,00,52,00,00,00^M
+"PreferredUILanguagesPending"=hex(7):66,00,72,00,2d,00,46,00,52,00,00,00^M

I will have just to create directly this key in the hive of my ansible 
user to have the right language directly I think...



Regards,

--
Jean-Yves LENHOF
jean-y...@lenhof.eu.org

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/af389056acd4984745a0707bc723e670%40lenhof.eu.org.


[ansible-project] Install a french version of SQLServer on an english windows server with ansible

2021-06-24 Thread 'Jean-Yves LENHOF' via Ansible Project

Hi,


I try to silently install a french version of SQLServer (this is not my 
idea, it's become this is the licensed version we have) with ansible 
using some code like this (I already installed MUI French lang pack via 
ansible) :


- name: "Change LANG"
  win_shell: |
Set-WinUILanguageOverride -Language fr-FR

- name: "Silent Install of SQL Server 2019"
  win_shell: |
D:\SETUP.EXE 
/ConfigurationFile=c:\Windows\ansible_SQLSERVER2019_EXPRESS_ConfigurationFile.ini 
/SAPWD=MySuperPassw0rd /IAcceptSQLServerLicenseTerms


But it keeps saying that there's something wrong with my language...

fatal: [myserver]: FAILED! => {
"changed": true,
"cmd": "D:\\SETUP.EXE 
/ConfigurationFile=c:\\Windows\\ansible_SQLSERVER2019_EXPRESS_ConfigurationFile.ini 
/SAPWD=MySuperPassw0rd /IAcceptSQLServerLicenseTerms",

"delta": "0:00:00.531238",
"end": "2021-06-24 04:13:53.809159",
"msg": "non-zero return code",
"rc": 1,
"start": "2021-06-24 04:13:53.277921",
"stderr": "",
"stderr_lines": [],
"stdout": "This SQL Server setup media does not support the language 
of the OS, or does not have the SQL Server English-language version 
installation files.  Use the matching language-specific SQL Server 
media; or install  both the language specific MUI and change the format 
and system locales through the regional settings in the control 
panel.\r\n\r\n\r\n\r\n",

"stdout_lines": [
"This SQL Server setup media does not support the language of 
the OS, or does not have the SQL Server English-language version 
installation files.  Use the matching language-specific SQL Server 
media; or install  both the language specific MUI and change the format 
and system locales through the regional settings in the control panel.",

"",
"",
""
]
}

But If I'm connecting on the server the UI Lang is changed to French (so 
this part seems to work) and if I run the command line on powershell it 
succeed.
On Linux I would have just surcharged LANG parameter before my command 
but on windows, I think this is not possible...


Is there's something on ansible which force the language to english ?
If not, is someone has an idea on what's going on...

Thanks


Regards,

--
Jean-Yves LENHOF
jean-y...@lenhof.eu.org

--
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 this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1e339d4d29c250b355347bedee222c91%40lenhof.eu.org.