Hi all,
I have this file "my_file.txt" with this content :
1,user1,host1
2,user2,host2
My inventory is :
host5
I want condition "when" for skip same task if inventory_hostname is not in
my file "my_file.txt"
exemple :
.
same tasks
.
.
*when: inventory_hostname not in ./my_file.txt*
but
Hi,
How delete with command in ansible.cfg the debogage on windows when i show
variable ?
I don't want this content when i see a variable :
"msg": {
"changed": false,
"failed": false,
It's possible or not please ? i don't find in the doc, i see this lien :
Hi,
upp please
Le mercredi 17 avril 2019 15:34:44 UTC+2, ryad9...@gmail.com a écrit :
>
> Hi,
>
> I don't understand, why mean about "the suppository is placed on the flat
> part" ??
>
> Thanks very much
>
> Regards,
>
> Le mercredi 17 avril 2019 14:53:20 UTC+2, lander.hern...@gmail.com a
>
Hi,
I don't understand, why mean about "the suppository is placed on the flat
part" ??
Thanks very much
Regards,
Le mercredi 17 avril 2019 14:53:20 UTC+2, lander.hern...@gmail.com a écrit :
>
> the suppository is placed on the flat part
>
--
You received this message because you are
Hi all,
I have this task :
- name: "Afficher la date et l'heure"
timetest:
register: time
- name: "Afficher le module time"
debug:
var: time
This module must display the date and time on a windows, but i see that :
TASK [Afficher le module time]
Hi ritesh,
Try to see if private clef ssh is well in autothorized_keys in host 10.1.0.6
Try also to ping with terminal for verify if connection is ok.
Thank you,
Regards,
Le mardi 16 avril 2019 13:17:29 UTC+2, ritesh r a écrit :
>
> ansible all -m ping
> 10.1.0.6 | UNREACHABLE! => {
>
Hi all,
I have two task :
- name: "Utilisation du replace dans un fichier"
set_fact:
mon_fichier: "{{ lookup('file', '/home/ansible/file.txt') |
replace('\n', ' ') }}"
and
- name: "Utilisation du regex_replace dans un fichier"
set_fact:
new_file: "{{ lookup('file',
Hi,
Okay, Thanks for you help Karl !! :)
I will going rename this directory and i think that will works ;)
You are very strong you will work at Microsoft in California Karl ! ;)
Thanks very much,
Regards,
Le jeudi 11 avril 2019 22:24:00 UTC+2, Karl Auer a écrit :
>
> Yes, I do understand,
Hi,
I have this directory but it's from windows create it in my linux.
In fact, when i write repo + CTL-V then CTL-M i can open this repertory
but the curseur is at left and not a right do you understand ?
Thanks for your help Karl !! ;)
Regards,
Le jeudi 11 avril 2019 14:27:31 UTC+2, Karl
Hi Karl Auer,
First, thank you very much for your answer complet Mister Karl Auer :)
Exactly, the cursor drops down one line, then to the far left of the window.
I would like on issue without rename the name of directory. I would like
only open this repertory but i don't find in internet :(
Hi all,
I have Debian linux 8.11 (jessie) with Ansible.
My problem is that i have two repertory :
*repertoire*
*repertoire?*
The repertory *repertoire?* it was created since windows so there is surely
the character ^M
when i try open this content with command line "cd repertoire?" i get a
Hi Sebastian Meyer,
You are the best !!
I do not know this module of Ansible "serial: 1"
Thank you very much !! ;)
I wish you a good day :)
Regards,
Le lundi 8 avril 2019 11:47:03 UTC+2, Sebastian Meyer a écrit :
>
> On 08.04.19 11:40, ryad9...@gmail.com wrote:
> > I want that when i run
Hi all,
I have my principal playbook with this content :
- hosts: all
become: no
gather_facts: no
roles:
- role
I have on file with content :
my_host_1 ansible_user: my_user
my_host_2 ansible_user: my_user
I want that when i run my task, ansible execute only on my_host_1
Hi Ankit,
I have the same result on my windows when i execut my script ansible ;(
I must find issue for that and i update this message.
Thank you !! ;)
Regards,
Le vendredi 29 mars 2019 12:18:42 UTC+1, Ankit a écrit :
>
> Use *var* instead of *msg*.
>
> - debug:
>*var*: "{{
Hi all,
I have this variable "my_variable" with content "machainedecaractere"
Why when i show this variable with module :
- debug:
msg: "{{ my_variable }}"
I show on wondows :
ok: [localhost] => {
"my_variable": {
"changed": false,
"failed": false,
"meta": {
Ok,
I will go to see for create module.
I hope that for create module it's not complex ;(
Thanks for answer Jonathan ;)
Regards,
Le mercredi 27 mars 2019 11:37:13 UTC+1, Jonathan Lozada De La Matta a
écrit :
>
> A lot of modules are community modules. Anyone is welcome and can submit
> PR's
Hi David,
Thanks for your answers ! :)
I don't understand why Ansible don't develope module for some command SQL
for MS SQL it's serious :/
One module for contact and execut some command on Microsoft SQL what ... :/
it's very ridicul
Regards,
Le mercredi 27 mars 2019 09:49:03 UTC+1, David
Hi all,
I want know if module mssql_db can only do "Add and remove MSSQL databases
from a remote host" ?
https://docs.ansible.com/ansible/latest/modules/mssql_db_module.html#examples
If i want exemple show table with mssql_db i don't can do it ?
Thanks for answers community ansible !! ;)
Hi andres,
Okey !! Thank you very much for your answer !!
I will try this isue quickly !! ;)
Thanks,
Regards
Le mardi 26 mars 2019 14:09:42 UTC+1, lalo andres a écrit :
>
> im used win_command whit SQLCMD
>
> Ejm:
> - name: Copia Script DBA
> win_copy:
> src: script_dbaGenerico.sql
>
Hi all,
I want know if Ansible can execut commands SQL for Microsoft SQL Server ?
I think that possible with command powershell but what is syntax ansible ?
for exemple, i want create table on my SQL Server (CREATE DATABASE ma_base)
with Ansible...
What is a procedure ? I know there is
Hi Keif Gwinn,
Thanks for answer, i will go try command SQL with powershell command in
ansible ;)
Regards,
Le vendredi 22 mars 2019 18:17:28 UTC+1, Keif Gwinn a écrit :
>
> Not really an ansible question, but you can always execute powershell
> commands a windows host with access to the
New question,
Can i execute line command SQL in ansible ?
How can i do it please ??
Thanks
Regards,
Le vendredi 22 mars 2019 16:48:13 UTC+1, ryad9...@gmail.com a écrit :
>
> Hi all,
>
> *"* Data synchronization can be resumed by right-clicking on the database
> and choosing "Resume data
Hi all,
*"* Data synchronization can be resumed by right-clicking on the database
and choosing "Resume data movement ...". *"*
[image: Resume_data_movement_of_sql_server.png]
I want know if in ansible its possible to realize the same thing as on the
image.
That is to resynchronize a
Hi Sebastian,
Ok.
Thanks for your answer
Regards,
Le vendredi 22 mars 2019 14:36:21 UTC+1, Sebastian Meyer a écrit :
>
> On 22.03.19 13:47, ryad9...@gmail.com wrote:
> > Hi all,
> >
> > I must use scp in ansible, i know module synchronize, copy but i d'ont
> find
> > the module scp.
> >
Hi all,
I must use scp in ansible, i know module synchronize, copy but i d'ont find
the module scp.
There is junos_scp but i d'ont know how he works :/
Is there a way to transfer files or directories by scp as the command linux
scp -rp
Thanks community ansible !! ;)
Regards,
--
You
Hi,
Ok thanks,
i will try synchronize module in ansible.
Thank you,
Regards,
Le vendredi 22 mars 2019 09:55:31 UTC+1, Dick Visser a écrit :
>
> If your goal is to have two equal directories, then the synchronize
> module would make sense.
>
> On Fri, 22 Mar 2019 at 09:25, > wrote:
> >
> >
Hi Eric,
Yes but the subject is -p since I'm mainly interested in keeping all the
characteristics of the file ...
In addition, I know that there is shell and command in ansible but I want a
"syntax" ansible. The objective with ansible it is to use its modules
(example: service, get_url, etc
Hi all,
I want do this command line in ansible :
*cp -rp /home/user/file1 /home/user/directory2/file2*
I have find this module copy :
- name: example copying file with owner and permissions
copy:
src: /srv/myfiles/foo.conf
dest: /etc/foo.conf
owner: foo
group: foo
mode:
Same answer '\\&' not works !!
someone have an idea please why replace('&', '\&') not works ?!!
Thank you very much
Regards,
Le vendredi 8 mars 2019 14:58:11 UTC+1, Mauricio Tavares a écrit :
>
> On Fri, Mar 8, 2019 at 8:06 AM > wrote:
> >
> > hi all,
> >
> > I want replace all caracter "
hi all,
Why when i run this task :
- name: Find /var/log files equal or greater than 10 megabytes ending with
.old or .log.gz
find:
paths: /{{ role_path }}/files/groups/
patterns: '*&*.txt'
register: mes_fichiers_speciaux
delegate_to: localhost
- debug:
var:
The task that i use is :
- name: Liste les groupes dans mes_groupes
find:
paths: /{{ role_path }}/files/groups/
register: mes_groupes
delegate_to: localhost
- debug:
var: mes_groupes
Why mes_groupes no content only the file who is in my path ?
Le vendredi 8 mars 2019 14:58:11
Thanks for your answer,
but why when show my variable i see :
"atime": 1552039856.1979122,
"ctime": 1552039856.1899123,
"dev": 65027,
"gid": 1003,
"gr_name": "ansible",
"inode": 125043,
"isblk":
hi all,
I want replace all caracter " & " by " \& "
- set_fact:
remplace: "{{ mon_groupe | replace('&', '\&') }}"
but when i use this task it's not work.
It's works only i skip " \ "
Someone have an idea please !! :)
Thank you very much !!
Regards,
--
You received this message because
Hi all,
I get the members of each group from my AD everything works but for groups
that have this name theMy_groupe_3&_AD
when opening my file my script generates here what he says to me as error :
my_user@hote1:~/my_user/roles/http/files/groups$ cat My_groupe_3&_AD.pub
[5] 92951
cat:
Or script who list all member of one group in AD please.
Regards,
Le vendredi 8 mars 2019 09:34:17 UTC+1, ryad9...@gmail.com a écrit :
>
> Hi all,
>
> I want get with command powershell in ansible all members in one group in
> Active Directory.
>
> I look documentation officielle of Ansible but
Hi all,
I want get with command powershell in ansible all members in one group in
Active Directory.
I look documentation officielle of Ansible but i don't find.
Can you help me please guy !! ;)
Thank you very much
Regards,
--
You received this message because you are subscribed to the
Solved,
Le lundi 4 mars 2019 17:04:10 UTC+1, ryad9...@gmail.com a écrit :
>
> Hy all,
>
> I'm sorry i ask a lot of question but it's my last question.
>
> I have this file :
>
> 2,user2,hostname2,appli1
> 1,user1,hostname1,*appli1,appli2,appli3*, ...
> 3,user3,hostname3,appli1
>
> *appli1* it's
Solved,
Le mardi 5 mars 2019 09:53:08 UTC+1, ryad9...@gmail.com a écrit :
>
> Hy all,
>
> I have this task :
>
> - set_fact:
> liste_appli: "{{ item.split(',')[3:] }}"
> with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv
> when: (item.split(',')[1] == ansible_user) and
Hy Jean-Yves,
It's works perfectly, you are the very the best i want become as you very
!! :)
Thanks,
Regards
Le lundi 4 mars 2019 16:59:53 UTC+1, Jean-Yves LENHOF a écrit :
>
>
> Le 04/03/2019 à 16:28, Jean-Yves LENHOF a écrit :
>
>
> Le 04/03/2019 à 13:24, ryad9...@gmail.com a écrit :
>
>
Hy all,
I have this task :
- set_fact:
liste_appli: "{{ item.split(',')[3:] }}"
with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv
when: (item.split(',')[1] == ansible_user) and (item.split(',')[2] ==
inventory_hostname)
delegate_to: localhost
And i have this task who
Hy all,
I'm sorry i ask a lot of question but it's my last question.
I have this file :
2,user2,hostname2,appli1
1,user1,hostname1,*appli1,appli2,appli3*, ...
3,user3,hostname3,appli1
*appli1* it's one application for install on host *hostname1* with user
*user1*
Back appli1 there is other
Thanks for answer, for information i have this error :
fatal: [rebebsr6cweb01]: FAILED! => {"msg": "Unexpected templating type
error occurred on ({{ indice|default([])|union(item.split(',')[0]) }}): can
only concatenate list (not \"unicode\") to list"}
Regards,
Le lundi 4 mars 2019 16:28:49
Hy all,
I have one file with this content:
1,user1,host1,appli1
2,user2,host2,appli2
3,user1,host1.appli3
This task works :
*- set_fact:*
* indice: "{{ item.split(',')[0] }}"*
* with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv*
* when: item.split(',')[1] == ansible_user
Problem solve, it's work with this file authorized_keys !!
Thank you very much !! :)
Jean-Yves LENHOF you must work at Microsoft and make Director DSI you are
so strong !!! ;)
Thank you
Regards
Le lundi 4 mars 2019 11:52:52 UTC+1, ryad9...@gmail.com a écrit :
>
> Hy all,
>
> Thanks for
Hy all,
Thanks for answer !! it's works perfectly !!
but when i use file /.ssh/authorized_keys it's not works !!
I thinks that it's "@" in this file who is problem ??
Regards,
Le vendredi 1 mars 2019 23:54:08 UTC+1, Jean-Yves LENHOF a écrit :
>
>
> Le 01/03/2019 à 22:10, Jean-Yves LENHOF a
Hy all,
I have this file with this content :
premiere line
deuxieme line
premiere line
premiere line
How to delete the same line in this file ?
I want this file :
premiere line
deuxieme line
Thank you guy !! ;)
--
You received this message because you are subscribed to the Google Groups
Hy all,
I have a file with :
1 . ma premiere ligne
2 . ma deuxieme ligne
How show only first line in this file :
1 . ma premiere ligne
Thank you guy !! ;)
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group
Uppp pleasee !!!
Le mercredi 27 février 2019 17:35:40 UTC+1, ryad9...@gmail.com a écrit :
>
> Hy all,
>
> I have one file with this content:
>
> 1,user1,host1,appli1
> 2,user2,host2,appli2
>
> My problem is that i want an task who look if {{
> ansible_user}},{{inventory_hostname}} ==
Hy all,
I have one file with this content:
1,user1,host1,appli1
2,user2,host2,appli2
My problem is that i want an task who look if {{
ansible_user}},{{inventory_hostname}} == "user1,host1"
He must return ID of this line "1"
If {{ ansible_user}},{{inventory_hostname}} == "user2,host2"He
Hy all,
how to delete a duplicate in a file?
Exemple, in my file1 there is :
user1
user2
user3
user1
user1
user1
I want that my task delete all duplicate for get this file :
user1
user2
user3
Thanks
Regards
--
You received this message because you are subscribed to the Google Groups
Thank you very much, regex_replace works perfect !!
You are very strong Jean-Yves !! :)
regards
Le mardi 26 février 2019 12:00:41 UTC+1, Jean-Yves LENHOF a écrit :
>
> Le 2019-02-26 11:53, ryad9...@gmail.com a écrit :
> > Hy all,
> >
> > I have a file called "file1.csv", the contents of
Hy all,
I have a file called "file1.csv", the contents of this file is:
word1 word2 word3 word4
I want him to jump in line with every word, i want this result :
word1
word2
word3
word4
I use this task for test but she replace every space by \n :
{{ lookup('file' ,
Hy all,
I have a file called "file1.csv"
I want this file to have two columns (user; hostname)
And that ansible fill is two columns from other files.
We will obtain in this file:
user ; hostname
user1 ; hostname1
user2 ;
Thank you ! :)
Regards,
Le jeudi 14 février 2019 12:01:08 UTC+1, Jean-Yves LENHOF a écrit :
>
> Le 2019-02-14 11:53, ryad9...@gmail.com a écrit :
> > hi,
> >
> > How to put two variables in one variable please ?
> >
> > I want that my variable get value of two other variables.
> >
> >
hi,
How to put two variables in one variable please ?
I want that my variable get value of two other variables.
Exemple:
var_1: {{ var_2 }} + {{ var_3 }}
or
var_1: {{ var_2 }}_{{ var_3 }}
Thank you very much !! :)
Regards,
--
You received this message because you are subscribed to the
Thank you very much Hugo Gonzalez,
You are strong, it's not easy find the solution same the more evident haha
;)
Regards,
Le mercredi 13 février 2019 21:42:02 UTC+1, Hugo Gonzalez a écrit :
>
>
> On 2/13/19 3:26 AM, ryad9...@gmail.com wrote:
>
> Hi all,
>
> I don't now why this task not
Hi,
If you want include task in your playbook, you must only do it :
*- include_task: /my_path/.../.../my_file_externe.yml*
This answer answers your question ?
Thanks
Le mercredi 13 février 2019 17:46:48 UTC+1, DM a écrit :
>
> Thanks I do have the "---" at the top
> When I run t he
Hi,
I think that you must use gather_fact in your playbook.
If this answer not answers your question, you can use option in ansible.
for example : ansible --help for get ip of someone computer.
Or : ansible my_name_computer -m . --help
Regards
Le mardi 12 février 2019 12:28:03 UTC+1,
Hi,
You must create file with extension .yml and beginning this file with "---"
at the top.
It's simply.
And launch file with line command "ansible-playbook my_file.yml"
This answer answers your question ?
Thanks
Le mercredi 13 février 2019 14:45:06 UTC+1, DM a écrit :
>
> How do you write
upp please !!
Someone have an idea please guy !!!
If my var = "jesuisla"
How get only "jesuis"
Thanks
Le mercredi 13 février 2019 10:26:22 UTC+1, ryad9...@gmail.com a écrit :
>
> Hi all,
>
> I don't now why this task not works:
>
> - set_fact:
> my_variable: "{{ ansible_user[0 and 1] +
Hi all,
I don't now why this task not works:
- set_fact:
my_variable: "{{ ansible_user[0 and 1] + 'gis' if
ansible_user!='wildfly' else 'wildfly' }}"
But *ansible_user[0] + ansible_user[1]* works but i want one syntaxe
shorter, exemple *ansible_user[0 and 1] *but this syntax not works
Thank you very much,
You are the best,
We can use :
ansible_user[5] is defined
and
ansible_user[5] is not defined
;)
Le mardi 12 février 2019 18:05:38 UTC+1, Pcis a écrit :
>
> Try when: ansible_user[5] is defined
--
You received this message because you are subscribed to the Google
Hi,
I have a new problem,
When i want test exemple:
- debug:
msg: "ca fonctionne"
when: ansible_user[5] == true
it don't works. I want show this message *"ca fonctionne"* when
ansible_user[5] exist
So when ansible_user == true
But this syntax don't works.
Thank you
--
You
Thank you very much Jean-Yves,
But i don't have a time, i must find solutions quickly.
And Documentation Ansible is so big and it's so difficult for find solution
in this documentation.
When i write in recherche documentation ansible exemple "when", it's don't
works recherche :/
Thank you !
Hi all,
I have a problem, i think there is a bug in ansible 2.8.0 but when i run
this task :
- pause:
prompt: "Voulez-vous effectuer ce deploiement ? (o/n)"
register: response
- debug:
msg: "deploiement effectue"
when: response == "o"
- meta: end_play
when: response != "o"
Thank you for your answer Pcis !! :)
In the ansible documentation, there is not this explication.
Now it's work !! ^^
You are the best ;)
subject solved
Le mardi 12 février 2019 16:06:09 UTC+1, Pcis a écrit :
>
> To prompt in a task you have to pause, you can only prompt without a pause
>
Hi all,
Why when i use prompt in playbook.yml it's works but not in
/roles/tasks/main.yml ??
*- vars_prompt:*
* - name: reponse*
* prompt: "Voulez-vous effectuer ce deploiement ? (o/n)"*
When i use prompt in my main playbook it's work when i launch this line
commande :
Thank you for answer Dick Visser,
But can you please give me one exemple with this task:
*- name: "stop my application"*
> * command: home/ .../ /my_application stop*
>
With syntax ansible so with "service" or "systemd" please Dick.
I think that you are the best, thank you !! :)
Le mardi
hi all,
UPPP please !!
Someone have an idea please guy !! :)
Le lundi 11 février 2019 16:07:21 UTC+1, ryad9...@gmail.com a écrit :
>
> Hello,
>
> How to stop or start not a service but an application.
>
> This command works but I would like an "ansible syntax" :
>
> *- name: "stop my
Because this task works:
command: /home/.../.../nginx stop
but i want a syntax ansible.
Thx for answer guy !! :)
Le lundi 11 février 2019 17:47:38 UTC+1, Sudheer S a écrit :
>
>
> On 11/02/19 4:14 PM, ryad9...@gmail.com wrote:
>
> New probleme:
>
> When i run this task it's works :
>
> -
Hi Tcpip,
You must use this syntax task :
*- name: my task*
* shell: ./my_script*
* when: my_variable == "1"*
./my_script==> the way of my script with a point front
my_variable can be PLAY_RECAP
tell me about this solution please.
Thank you
Le lundi 11 février 2019 17:10:19 UTC+1,
Hi,
exactly, answer is the next command:
*ansible my_host -m service_facts -i my_ip_adress*
Thank you very much Jean-Yves LENHOF !! ;)
you are the best
subject solved !!
Le lundi 11 février 2019 16:16:36 UTC+1, Jean-Yves LENHOF a écrit :
>
> Le 2019-02-11 14:48, ryad9...@gmail.com a écrit :
Hello,
How to stop or start not a service but an application.
This command works but I would like an "ansible syntax" :
*- name: "stop my application"*
* command: home/ .../ /my_application stop*
This command works but i want an "ansible syntax" please guy.
Thank you very much ansible
Ok but,
ansible_facts.services is not defined when i use it and I display it on the
screen.
Why ?
Le lundi 11 février 2019 14:27:50 UTC+1, Jean-Yves LENHOF a écrit :
>
> Le 2019-02-11 14:22, ryad9...@gmail.com a écrit :
> > Hi,
> >
> > In localhost, i can write next command in prompt :
>
Hi,
In localhost, i can write next command in prompt :
*ansible localhost -m service -a "name=nginx state=started"*
But how show all services in target host exemple :
*ansible target_host -m service -a all*
*it's not work.*
Someone have a idea please ??
thanks very much guy !!
--
You
New probleme:
When i run this task it's works :
- name: "stopper nginx"
systemd:
name: /my_pattern/nginx
state: stopped
But there is a warning message:
[WARNING]: The service (my_pattern/nginx) is actually an init script but
the system is
managed by systemd
It's normaly ?
Le
What happens when you use:
- name: "stop nginx"
systemd:
name: nginx
state: stopped
==> It's the same problem, the message error is :
changed: [edeefreffe] => {"changed": true, "msg": "Service nginx not found
on host, assuming it will exist on full run"}
Same in specify become
And this same task in handler works :
- name: "stop nginx"
service:
name: nginx
state: stopped
It's very strange, i think that it's bug in ansible ?
Le lundi 11 février 2019 10:01:25 UTC+1, ryad9...@gmail.com a écrit :
>
> So,
>
> When I run my playbook with this task :
>
> -
So,
When I run my playbook with this task :
- name: "stop nginx"
service:
name: nginx
state: stopped
I have this message :
changed: [edeefreffe] => {"changed": true, "msg": "Service nginx not found
on host, assuming it will exist on full run"}
but with this command ansible it's
Hi,
When i use service in ansible same this task :
- name: "stop nginx"
service:
name: nginx
state: stopped
Same with "become: yes" and "pattern: my_pattern_file"
but with line "command: sudo systemctl stop nginx" it's working !! WHY ?
Thanks you for you answers guy ! :)
--
80 matches
Mail list logo