Re: [ansible-project] Molecule : basic documentation

2022-09-18 Thread Sudheer S
I made some progress by adding a task in tasks.yml. It was empty before. Also edited molecule.yml. tasks.main: --- # tasks file for my_new_role - name: install   apt:     name:   - apache2   update_cache: "yes" molecule/default/molecule.yml: --- dependency:   name: galaxy driver:  

[ansible-project] Molecule : basic documentation

2022-09-18 Thread Sudheer S
Hello, I am trying to make a hello world type testing with Molecule. But it seems that the Molecule documentation is outdated. https://molecule.readthedocs.io/en/latest/ https://molecule.readthedocs.io/en/latest/installation.html has instructions from Ubuntu 16.x. But not 20.x or 22.x.

[ansible-project] Molecule 3 test

2022-05-29 Thread Sudheer S
Hello, I have initialized molecule and try to run a test: molecule --debug converge DEBUG    Validating schema /home/sudheer/workspace/gavika/ansible-projects/easy_rsa/molecule/default/molecule.yml. INFO default scenario test matrix: dependency, create, prepare, converge INFO

Re: [ansible-project] Accessing file content via ansible

2019-07-10 Thread Sudheer S
can access the loop item via the variable 'item'. I don't see a loop in your playbook. In your example, look at versions.stdout for file contents. Or use the Slurp module to read file contents. - Sudheer S -- You received this message because you are subscribed to the Google Groups "A

Re: [ansible-project] copy files from remote to local

2019-07-01 Thread Sudheer S
        dest: /tmp/test/         flat: yes         owner: root         group: root         mode: 0777 Please describe what do you mean by not working. Do you get any error message? Describe the expected and actual results. - Sudheer S -- You received this message because you are subscribed to the Google

Re: [ansible-project] How to try one task in Ansible ?

2019-05-16 Thread Sudheer S
y playbook with command ansible-playbook, ansible try only this task and he tell me there is any error or not. do you understand ? Can you help me please community ansible !! ;) Use tags: https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html - Sudheer S -- You received th

Re: [ansible-project] Sourcing a script on a remote host to use the functions in the script

2019-05-01 Thread Sudheer S
ted this. This if off the top of my head: You may have to avoid using && and call it like "bash -lc 'source /root/vBNG/env.sh ins'". Or put everything in a single script including the the `source` command. - Sudheer S -- You received this message because you are subscribed to

Re: [ansible-project] Sourcing a script on a remote host to use the functions in the script

2019-04-30 Thread Sudheer S
and not found" Both control and remote node are running /bin/bash Is there something I am missing? Yes, you need a login shell. The Ansible shell module does not use a login shell. Try: shell: bash -lc 'source [filename.sh] && [function name]' - Sudheer S -- You receive

Re: [ansible-project] Ansible inventory organization

2019-03-25 Thread Sudheer S
:   hosts:     dbserver1     www: hosts:    wwwserver1 You could execute playbook like: ansible-playbook -i environments/production/ webservers.yml - Sudheer S -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubs

Re: [ansible-project] aws_s3 module fails, says Boto3 is missing when it is not - bug?

2019-03-23 Thread Sudheer S
SH on to the target, start the Python interpreter and see if you can import boto: python Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> im

Re: [ansible-project] Sending JSON variable as a body in curl command

2019-03-15 Thread Sudheer S
-H", "Content-Type:application/json", "https://gns-ansible-dev.corp.xxx.com:8443/api/job/CRQmattcheng22;, "-k", "-d", "{ustatus:", "ucomplete,", "umessage:", "usuccessfully completed,", "uactions:", "

Re: [ansible-project] How to use the different parameter for each host in playbook

2019-03-04 Thread Sudheer S
are those 'different-2 parameter' are? - Sudheer S -- 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.co

Re: [ansible-project] ansible error fpr sudo user

2019-02-22 Thread Sudheer S
staging environment where the playbook is failing." - visar - Sudheer On Fri, 22 Feb 2019, 19:49 Sudheer S, <mailto:sudh...@techchorus.net>> wrote: On 22/02/19 7:29 PM, visar wrote: Hello Sudheer, Yes, Password required for any action . because my user "admi

Re: [ansible-project] ansible error fpr sudo user

2019-02-22 Thread Sudheer S
to server manually and make sure you can use sudo without password. - Sudheer S -- 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-projec

Re: [ansible-project] ansible error fpr sudo user

2019-02-22 Thread Sudheer S
3 PM UTC+5:30, Sudheer S wrote: On 22/02/19 7:19 PM, visar wrote: Hello Sudeer.. No luck. Logon to the server manually as admin and try doing something like `sudo ls`.  See if password is required on the server. - Sudheer | --- - name: Replace the sile

Re: [ansible-project] ansible error fpr sudo user

2019-02-22 Thread Sudheer S
* 10.16.24.102            : ok=0    changed=0    unreachable=0 failed=1 10.16.24.103            : ok=0    changed=0    unreachable=0 failed=1 localhost                 : ok=3    changed=0 unreachable=0    failed=1 | On Friday, Februar

Re: [ansible-project] ansible error fpr sudo user

2019-02-22 Thread Sudheer S
playbooks are failing in this environment. Have this in your playbook: become: true - Sudheer S -- 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

Re: [ansible-project] Check if test server configuration is same as prod server

2019-02-15 Thread Sudheer S
On 15/02/19 4:28 PM, Yacine Mourchid wrote: I'm a beginner with Ansible. I wanna know how to check if configuration of test server and prod are same or if there is a difference. And if it's possible, how to know what is the difference between them. I've several server to check. You have

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

2019-02-12 Thread Sudheer S
ent 'stop', then what you have is correct. I don't see any Ansible anti-pattern here. - Sudheer S -- 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, se

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

2019-02-11 Thread Sudheer S
On 11/02/19 4:14 PM, ryad9200...@gmail.com wrote: 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

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

2019-02-11 Thread Sudheer S
On 11/02/19 2:31 PM, ryad9200...@gmail.com wrote: 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

Re: [ansible-project] Ansible but with Python instead of YAML

2019-02-01 Thread Sudheer S
On 01/02/19 4:12 PM, Thomas Güttler wrote: I am using a different config management tool up to now (not ansible). I think about switching to ansible. But I don't like YAML. Ansible embraces YAML. I like Python. Is it doable to use Python syntax instead of YAML? Technically, yes. But