[ansible-project] When: inventory_hostname not in ./my_file.txt

2019-04-18 Thread ryad9200000
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

[ansible-project] stdout debogage in ansible

2019-04-17 Thread ryad9200000
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 :

[ansible-project] Re: Problem windows when i see variable

2019-04-17 Thread ryad9200000
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 >

[ansible-project] Re: Problem windows when i see variable

2019-04-17 Thread ryad9200000
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

[ansible-project] Problem windows when i see variable

2019-04-17 Thread ryad9200000
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]

[ansible-project] Re: please help

2019-04-16 Thread ryad9200000
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! => { >

[ansible-project] Ansible regex_replace and replace

2019-04-15 Thread ryad9200000
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',

Re: [ansible-project] Problem with linux debian Ansible

2019-04-12 Thread ryad9200000
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,

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
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

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
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 :(

[ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
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

Re: [ansible-project] Execut playbook host after host

2019-04-08 Thread ryad9200000
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

[ansible-project] Execut playbook host after host

2019-04-08 Thread ryad9200000
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

Re: [ansible-project] Ansible show simple variable

2019-03-29 Thread ryad9200000
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*: "{{

[ansible-project] Ansible show simple variable

2019-03-29 Thread ryad9200000
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": {

Re: [ansible-project] module mssql_db in ansible

2019-03-27 Thread ryad9200000
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

Re: [ansible-project] module mssql_db in ansible

2019-03-27 Thread ryad9200000
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

[ansible-project] module mssql_db in ansible

2019-03-27 Thread ryad9200000
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 !! ;)

Re: [ansible-project] Ansible and SQL Server ?

2019-03-26 Thread ryad9200000
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 >

[ansible-project] Ansible and SQL Server ?

2019-03-26 Thread ryad9200000
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

Re: [ansible-project] Re: Ansible synchronize database sql

2019-03-25 Thread ryad9200000
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

[ansible-project] Re: Ansible synchronize database sql

2019-03-22 Thread ryad9200000
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

[ansible-project] Ansible synchronize database sql

2019-03-22 Thread ryad9200000
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

Re: [ansible-project] command scp in ansible

2019-03-22 Thread ryad9200000
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. > >

[ansible-project] command scp in ansible

2019-03-22 Thread ryad9200000
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

Re: [ansible-project] Re: In ansible how do cp -rp

2019-03-22 Thread ryad9200000
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: > > > >

[ansible-project] Re: In ansible how do cp -rp

2019-03-22 Thread ryad9200000
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

[ansible-project] In ansible how do cp -rp

2019-03-21 Thread ryad9200000
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:

Re: [ansible-project] remplace: "{{ mon_groupe | replace('&', '\&') }}"

2019-03-08 Thread ryad9200000
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 "

[ansible-project] I have a strange result

2019-03-08 Thread ryad9200000
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:

Re: [ansible-project] remplace: "{{ mon_groupe | replace('&', '\&') }}"

2019-03-08 Thread ryad9200000
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

Re: [ansible-project] remplace: "{{ mon_groupe | replace('&', '\&') }}"

2019-03-08 Thread ryad9200000
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":

[ansible-project] remplace: "{{ mon_groupe | replace('&', '\&') }}"

2019-03-08 Thread ryad9200000
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

[ansible-project] Error on open a file because expression

2019-03-08 Thread ryad9200000
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:

[ansible-project] Re: Get members of group AD with Powershell

2019-03-08 Thread ryad9200000
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

[ansible-project] Get members of group AD with Powershell

2019-03-08 Thread ryad9200000
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

[ansible-project] Re: How get some word in file

2019-03-05 Thread ryad9200000
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

[ansible-project] Re: Get indice in variable

2019-03-05 Thread ryad9200000
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

Re: [ansible-project] Get item with file

2019-03-05 Thread ryad9200000
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 : > >

[ansible-project] Get indice in variable

2019-03-05 Thread ryad9200000
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

[ansible-project] How get some word in file

2019-03-04 Thread ryad9200000
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

Re: [ansible-project] Get item with file

2019-03-04 Thread ryad9200000
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

[ansible-project] Get item with file

2019-03-04 Thread ryad9200000
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

Re: [ansible-project] How to delete the same line in a file ?

2019-03-04 Thread ryad9200000
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

Re: [ansible-project] How to delete the same line in a file ?

2019-03-04 Thread ryad9200000
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

[ansible-project] How to delete the same line in a file ?

2019-03-01 Thread ryad9200000
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

[ansible-project] How show first line in file

2019-02-28 Thread ryad9200000
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

[ansible-project] Re: Get indice in file if caracter present

2019-02-28 Thread ryad9200000
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}} ==

[ansible-project] Get indice in file if caracter present

2019-02-27 Thread ryad9200000
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

[ansible-project] How to delete a duplicate in file ?

2019-02-26 Thread ryad9200000
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

Re: [ansible-project] how to skip a line in a file

2019-02-26 Thread ryad9200000
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

[ansible-project] how to skip a line in a file

2019-02-26 Thread ryad9200000
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' ,

[ansible-project] write multiple user in a column in file

2019-02-26 Thread ryad9200000
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 ;

Re: [ansible-project] Two variables in one variable

2019-02-14 Thread ryad9200000
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. > > > >

[ansible-project] Two variables in one variable

2019-02-14 Thread ryad9200000
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

Re: [ansible-project] select one and two caracter of variable

2019-02-14 Thread ryad9200000
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

[ansible-project] Re: Ansible - write only specific output

2019-02-13 Thread ryad9200000
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

[ansible-project] Re: ansible loop iteration on result

2019-02-13 Thread ryad9200000
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,

[ansible-project] Re: Ansible - write only specific output

2019-02-13 Thread ryad9200000
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

[ansible-project] Re: select one and two caracter of variable

2019-02-13 Thread ryad9200000
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] +

[ansible-project] select one and two caracter of variable

2019-02-13 Thread ryad9200000
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

[ansible-project] Re: ansible variable conditional tcheck

2019-02-12 Thread ryad9200000
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

[ansible-project] ansible variable conditional tcheck

2019-02-12 Thread ryad9200000
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

Re: [ansible-project] problem meta: end_play with when conditional

2019-02-12 Thread ryad9200000
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 !

[ansible-project] problem meta: end_play with when conditional

2019-02-12 Thread ryad9200000
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"

[ansible-project] Re: Prompt in ansible

2019-02-12 Thread ryad9200000
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 >

[ansible-project] Prompt in ansible

2019-02-12 Thread ryad9200000
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 :

Re: [ansible-project] stop or start application ?

2019-02-12 Thread ryad9200000
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

[ansible-project] Re: stop or start application ?

2019-02-12 Thread ryad9200000
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

Re: [ansible-project] Re: ansible service not work but command work

2019-02-11 Thread ryad9200000
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 : > > -

[ansible-project] Re: PLAY RECAP -- Status

2019-02-11 Thread ryad9200000
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,

Re: [ansible-project] Show all services target host

2019-02-11 Thread ryad9200000
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 :

[ansible-project] stop or start application ?

2019-02-11 Thread ryad9200000
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

Re: [ansible-project] Show all services target host

2019-02-11 Thread ryad9200000
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 : >

[ansible-project] Show all services target host

2019-02-11 Thread ryad9200000
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

[ansible-project] Re: ansible service not work but command work

2019-02-11 Thread ryad9200000
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

Re: [ansible-project] Re: ansible service not work but command work

2019-02-11 Thread ryad9200000
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

[ansible-project] Re: ansible service not work but command work

2019-02-11 Thread ryad9200000
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 : > > -

[ansible-project] Re: ansible service not work but command work

2019-02-11 Thread ryad9200000
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

[ansible-project] ansible service not work but command work

2019-02-08 Thread ryad9200000
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 ! :) --