[prometheus-users] Re: what insecure_skip_verify will do

2024-05-16 Thread Sameer Modak
skip the certificate Check. So certificate May be valid or >>> invalid and is Always trusted. >>> Connection is still encrypted >>> >>> Sameer Modak schrieb am Mittwoch, 15. Mai 2024 um 17:04:07 UTC+2: >>> >>>> Hello Team, >>>>

[prometheus-users] Re: what insecure_skip_verify will do

2024-05-16 Thread Sameer Modak
encrypted > > Sameer Modak schrieb am Mittwoch, 15. Mai 2024 um 17:04:07 UTC+2: > >> Hello Team, >> >> If i set insecure_skip_verify: true will my data be unsecured. Will it >> be non ssl?? >> > -- You received this message because you are subscr

[prometheus-users] what insecure_skip_verify will do

2024-05-15 Thread Sameer Modak
Hello Team, If i set insecure_skip_verify: true will my data be unsecured. Will it be non ssl?? -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Re: become: true does not work but -b works

2024-05-14 Thread Sameer Modak
Hello Brian, Yes it works , Issue was my role was picking the values from roles directory instead from current directory hence despite making changes at current file become was not working. On Tuesday, May 14, 2024 at 8:12:07 PM UTC+5:30 Brian Coca wrote: > We have tests for this and i just

[ansible-project] Re: become: true does not work but -b works

2024-05-14 Thread Sameer Modak
e: Deploy jmx_exporter hosts: all become: true. < works fine if we set it here but i dont want it in this way. tasks: - name: Importing jmx prometheus role import_role: name: prometheusjmx On Tuesday, May 14, 2024 at 2:08:14 PM UTC+5:30 Sameer Modak wrote: > Hello team

[ansible-project] become: true does not work but -b works

2024-05-14 Thread Sameer Modak
Hello team, I am running a role like below despite putting become true for install task i get error. However if run with -b it works. Getting error while running this , ansible-playbook prometheusjmxrole.yml -i ../inventory/staging.yaml The full traceback is: WARNING: The below traceback may

Re: [ansible-project] how to run play for subgroup when children has same name

2024-04-25 Thread Sameer Modak
ka[01:06].dev >> kafka_dev_web: […] # omitted for brevity, >> kafka_dev_db: […] # but you get the idea. >> children: >> kafka_qa: >> children: >> kafka_qa_app: >> children: >> kafka_qa_app_zoo:

Re: [ansible-project] how to run play for subgroup when children has same name

2024-04-25 Thread Sameer Modak
[…] # but you get the idea. >> children: >> kafka_qa: >> children: >> kafka_qa_app: >> children: >> kafka_qa_app_zoo: >> hosts: >> qa1-main-zookpr[01:03].qa >> kaf

Re: [ansible-project] how to run play for subgroup when children has same name

2024-04-25 Thread Sameer Modak
dev1-main-kafka[01:06].dev >> kafka_dev_app_schema: >> hosts: >> dev1-main-kafka[01:06].dev >> kafka_dev_web: […] # omitted for brevity, >> kafka_dev_db: […] # but you get the idea. >> children: >>

[ansible-project] getting Asible.errors.AnsibleUndefinedVariable: 'broker' is undefined despite assigning in inventory file

2024-04-22 Thread Sameer Modak
Hello Team, I am putting broker: true and zookeeper: true in inventory file but i still getting below exception as its referred in j2 file An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'broker' is

[ansible-project] how to run play for subgroup when children has same name

2024-04-19 Thread Sameer Modak
I have an inventory something like this , each main cluster has children like broker. Now how do i run any tasks against perticular group.broker. When we pass the group with --limit it does not work it runs on all broker. Also main playbook has hosts:all in it

Re: [ansible-project] how to run perticular dependency role for specific host group

2024-04-19 Thread Sameer Modak
Thanks Brian. so there is no possibility to achieve with dependencies ryt?? On Thursday, April 18, 2024 at 8:55:49 PM UTC+5:30 Brian Coca wrote: > Don't use dependencies, use include_role and make it conditional > > -- > -- > Brian Coca (he/him/yo) > > -- You received this message

[ansible-project] how to run perticular dependency role for specific host group

2024-04-18 Thread Sameer Modak
Hello Team, We have below grafana agent play.yaml and inside dependency we have mentioned below content now issue is kafka_exporter role runs on all hosts. We want only to run on broker host how to achieve it?? grafana-agent-play.yaml - name: "GRAgent Play" hosts: all:!localhost

[ansible-project] how to encrypt ssh_pass password without asking any more password

2023-12-13 Thread Sameer Modak
Hello Team, how to encrypt ssh_pass password without asking any more password. I dont want to type password everytime i run the ad hoc command like ansible -i hosts.yaml -m shell -a "ulimit -a". I dont want to put the password everytime i just want to hide or obscure or salt the below

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-11-18 Thread Sameer Modak
nt repeat yourself), re-usable. > > Dne čtvrtek 9. listopadu 2023 v 17:29:28 UTC+1 uživatel Sameer Modak > napsal: > >> Hello Todd, >> >> I tried serial and it works but my problem is, serial works in playbook >> so when i write import_playbook inside include_task

[prometheus-users] can we run prometheus jmx exporter as a stanalone service

2023-11-12 Thread Sameer Modak
can we run prometheus jmx exporter as a stanalone service like node exporter and how do we monitor the the kafka metrics if we run it as standalone process. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group

Re: [ansible-project] Run ansible tasks on hosts one-by-one

2023-11-11 Thread Sameer Modak
ok i heard you. Let met try On Friday, November 10, 2023 at 9:31:55 PM UTC+5:30 Brian Coca wrote: > Pllaybooks can contain plays, plays can contain tasks, blocks and > roles, but you cannot reverse the direction of 'containers'. > > You CANNOT have a play in a role, so your question is a non

Re: [ansible-project] Run ansible tasks on hosts one-by-one

2023-11-10 Thread Sameer Modak
how should place these playbooks and what should be the order. Below is my role . https://github.com/sameergithub5/prometheusrole On Monday, November 6, 2023 at 8:43:58 PM UTC+5:30 Brian Coca wrote: > roles can be in plays, plays cannot be in roles > > > -- > -- > Brian Coca > > --

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-11-09 Thread Sameer Modak
/ansible/latest/playbook_guide/playbooks_error_handling.html#setting-a-maximum-failure-percentage> > > . Blocks don't come into it. > > > On 11/3/23 9:22 AM, Sameer Modak wrote: > > Hello will, > > > > i tried to do it with block and serial no it d

Re: [ansible-project] Re: how to append to a line keeping

2023-11-08 Thread Sameer Modak
; kafka_jmx_opts_str: 'KAFKA_JMX_OPTS={{ kafka_jmx_opts | join(" ") }}' > tasks: > - name: Manage kafka_jms_opts in override.conf > ansible.builtin.lineinfile: > path: '{{ filename }}' > regexp: 'Environment="KAFKA_JMX_OPTS=.*"' >

Re: [ansible-project] Run ansible tasks on hosts one-by-one

2023-11-06 Thread Sameer Modak
, November 4, 2023 at 6:34:58 AM UTC+5:30 Todd Lewis wrote: > - name: One host at a time > hosts: ducks_in_a_row > serial: 1 > max_fail_percentage: 0 > tasks: > - task1 > - task2 > - task3 > > > > On 11/3/23 3:57 PM, Sameer Modak wrote: &g

Re: [ansible-project] Run ansible tasks on hosts one-by-one

2023-11-06 Thread Sameer Modak
oring Restartandcheck yaml ^ here On Saturday, November 4, 2023 at 6:34:58 AM UTC+5:30 Todd Lewis wrote: > - name: One host at a time > hosts: ducks_in_a_row > serial: 1 > max_fail_percentage: 0 > tasks: > - task1 > - task2 > - task3 > &g

Re: [ansible-project] Run ansible tasks on hosts one-by-one

2023-11-03 Thread Sameer Modak
How to acheive this then ?? On Friday, November 3, 2023 at 11:36:48 PM UTC+5:30 Brian Coca wrote: > serial is a PLAY level keyword and what you want to use in this case, > throttle will only control the forks/parallel jobs, not serialize a > batch (this is what serial does). > > -- > --

[ansible-project] Run ansible tasks on hosts one-by-one

2023-11-03 Thread Sameer Modak
Here is my question exactlyt the same. https://stackoverflow.com/questions/64048208/run-ansible-tasks-on-hosts-one-by-one Run 3 tasks one after another on single host at at a time. if any of that tasks fails dont move ahead. Now when i use throttle with block it runs tasks on both the hosts.

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-11-03 Thread Sameer Modak
oup your service restart and service availability check. > > I strongly going and taking the time to read the rolling update example > that's already documented, understand it and then think about how to apply > that to what you're trying to achieve. > > > > On Fri, 3 No

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-11-03 Thread Sameer Modak
der') serial: 1 ~ On Wednesday, November 1, 2023 at 3:39:54 PM UTC+5:30 Sameer Modak wrote: > Let me try with block and serial and get back to you > > On Wednesday, November 1, 2023 at 5:33:14 AM UTC+5:30 Will McDonald wrote: > >> Edit: s/along with a failed_when/along with wait_fo

[ansible-project] Re: how to append to a line keeping

2023-11-01 Thread Sameer Modak
f string present append it. On Wednesday, November 1, 2023 at 4:11:40 PM UTC+5:30 Sameer Modak wrote: > We want to only append string > > -javaagent:{{jmxexporter_jar_path}}={{zookeeper_jmxexporter_port}}:{{zookeeper_jmxexporter_config_path}}"' > to a file override.conf &

[ansible-project] how to append to a line keeping

2023-11-01 Thread Sameer Modak
We want to only append string -javaagent:{{jmxexporter_jar_path}}={{zookeeper_jmxexporter_port}}:{{zookeeper_jmxexporter_config_path}}"' to a file override.conf if we have "Environment="KAFKA_JMX_OPTS" in it else add new line "actual line"

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-11-01 Thread Sameer Modak
ttps://superuser.com/questions/1664197/ansible-keyword-throttle (loads >> of other 2n+1 rolling update/restart examples out there too: >> https://stackoverflow.com/questions/62378317/ansible-rolling-restart-multi-cluster-environment >> ) >> >> >> >> >>

Re: [ansible-project] restart service, check if port is ready to accept and then move to next host

2023-10-31 Thread Sameer Modak
ilability > before continuing: > > > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_module.html > > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_connection_module.html > > > > > > On Tue, 31 O

[ansible-project] restart service, check if port is ready to accept and then move to next host

2023-10-31 Thread Sameer Modak
restart service, check if service is ready to accept connection because it takes time to come up. Once we sure its listening on port then only move to next host. unless dont move because we can only afford to have one service down at a time. is there any to short hand or ansible native way to

Re: [ansible-project] Re: how to set different backup directory than current while using backup=yes

2023-10-31 Thread Sameer Modak
Thanks todd for explanation On Tuesday, October 31, 2023 at 5:47:35 PM UTC+5:30 Todd Lewis wrote: > (For background, a great discussion surrounding the missing backup_dir: > task option can be read here: here > . Highly recommended.) > > You

[ansible-project] how to set different backup directory than current while using backup=yes

2023-10-30 Thread Sameer Modak
how to set different backup directory than current while using backup=yes in ansible modules. It takes backup in current directory with .conf.date which actually valid for application .conf anything do we have any way where we can give specific backup directory path -- You received this

[ansible-project] Re: how to extract minor version from major version variable

2023-10-25 Thread Sameer Modak
i tried with regex_replace('^([0-9])\\.([0-9]*).*', '\\1.\\2') but is there any other better way to do it On Wednesday, October 25, 2023 at 6:16:34 PM UTC+5:30 Sameer Modak wrote: > Hello Team, > > What is the correct way to extract just major version from full version > lik

[ansible-project] how to extract minor version from major version variable

2023-10-25 Thread Sameer Modak
Hello Team, What is the correct way to extract just major version from full version like , full version is : 2.8.3 need version: 2.8 do we use split or regex -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] what is ansible.builtin.file vs just file module

2023-10-25 Thread Sameer Modak
Thanks a lot Brian. Your explanation cleared my views. On Friday, October 20, 2023 at 8:44:16 PM UTC+5:30 Brian Coca wrote: > short answer: > Because collections > > long answer: > Since we added the 'collections' feature we also introduced > namespaces, including for the modules that existed

[ansible-project] what is ansible.builtin.file vs just file module

2023-10-20 Thread Sameer Modak
Hello Team, I just want to know why we have builtin for all modules in ansible earlier it was just module name -- 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] Re: restart service only if its successful

2023-07-14 Thread Sameer Modak
else to comment on. > -- > Todd > > > On 7/13/23 2:51 PM, Sameer Modak wrote: > > Hello Todd/Dick/Stephan, > > This is how i did, do u thnink any of below tasks can still be handled > otherwise (more accurately) or this is the best way. > > --- > - ho

Re: [ansible-project] Re: restart service only if its successful

2023-07-13 Thread Sameer Modak
d.stdout_lines[0] | int) If this is most accurate way then i think guys who are looking for similar solution can use this for reference. On Wednesday, July 12, 2023 at 8:17:09 PM UTC+5:30 Sameer Modak wrote: > I get it . But this is specific case where my current process is not

[ansible-project] is there any order by clause for hosts to execute task in certain order

2023-07-12 Thread Sameer Modak
Hello Team, We have a situation where we have to run same script on all 3 machines but in specific order like first it should be run on follower and then on leader. now to achieve this i have to repeat same task again with different condition. Can it be achieve in one ??? - name: Kill

Re: [ansible-project] Re: restart service only if its successful

2023-07-12 Thread Sameer Modak
0 || exit 1 else exit 1 fi On Wednesday, July 12, 2023 at 5:01:27 PM UTC+5:30 Dick Visser wrote: > Hii, > > > On Wed, 12 Jul 2023 at 12:53, Sameer Modak wrote: > >> Hi Todd, >> >> I tried to run script with shell module but it fails with below error, >&g

Re: [ansible-project] Re: restart service only if its successful

2023-07-12 Thread Sameer Modak
systemctl start confluent-zookeeper510 fi systemctl status confluent-zookeeper510 register: zkstart failed_when: zkstart.rc != 0 when: not zkmode.stdout_lines is search('leader') On Wednesday, July 12, 2023 at 4:23:06 PM UTC+5:30 Sameer Modak wrote: > Hi Todd, > >

Re: [ansible-project] Re: restart service only if its successful

2023-07-12 Thread Sameer Modak
tart newly configured systemd throttle: 1 #ignore_errors: yes any_errors_fatal: true shell: | if [ pkill --signal 9 -f zookeeper.properties ] ; then systemctl start confluent-zookeeper510; sleep 2; echo "stat" | nc localhost 2181;st="$?"

Re: [ansible-project] Re: restart service only if its successful

2023-07-12 Thread Sameer Modak
processes and restart service > ansible.builtin.shell: | > if pkill --signal 9 -f zookeeper.properties ; then >sleep 6 >systemctl start confluent-zookeeper510 > fi > systemctl status confluent-zookeeper510 > register: zkstart > > > On 7/11

[ansible-project] Re: restart service only if its successful

2023-07-11 Thread Sameer Modak
rt.rc != 0 when: not zkmode.stdout_lines is search('leader') On Tuesday, July 11, 2023 at 12:47:04 AM UTC+5:30 Sameer Modak wrote: > Hello team, > > I am trying to restart zookeeper service on all 3 nodes sequentially , we > want restart zookeeper service one by one but it will be

[ansible-project] restart service only if its successful

2023-07-10 Thread Sameer Modak
Hello team, I am trying to restart zookeeper service on all 3 nodes sequentially , we want restart zookeeper service one by one but it will be only run on 2nd server if 1st server zookeeper service was successful. How do i achieve this in 1 task . task should fail if service is not properly

[ansible-project] item undefined when try to use through loop 2nd time

2023-06-04 Thread Sameer Modak
Code: - name: check previous kafka broker server.properties shell: "ps -ef | grep -i kafka | grep -i server.properties | awk '{print $NF}'" register: serverfile tags: - upgrade - upgrade12 - name: debug grepout set_fact: srvfilepath: "{{ item }}"

[ansible-project] item variable not defined loop does not work well with stdout_lines

2023-06-04 Thread Sameer Modak
Code: - name: check previous kafka broker server.properties shell: "ps -ef | grep -i kafka | grep -i server.properties | awk '{print $NF}'" register: serverfile tags: - upgrade - upgrade12 - name: debug grepout set_fact: srvfilepath: "{{ item }}"

Re: [ansible-project] unable to extract version out of registered output

2023-05-23 Thread Sameer Modak
d_path[0] | regex_replace(kafka_ver_regex, > '\\2') }}" > vars: > kafka_ver_regex: (.*kafka_\d\.\d\d-)(\d\.\d\.\d)(-.*\.jar) > > That would give me - > > TASK [debug] > ******** > ok:

Re: [ansible-project] unable to extract version out of registered output

2023-05-23 Thread Sameer Modak
tags: vern On Tuesday, May 23, 2023 at 7:27:19 PM UTC+5:30 Abhijeet Kasurde wrote: > files_found_path is an array/list. So you need files_found_path[0].split > > On Tue, May 23, 2023 at 5:42 AM Sameer Modak > wrote: > >> Hello Team, >> >> Code >> &g

[ansible-project] unable to extract version out of registered output

2023-05-23 Thread Sameer Modak
Hello Team, Code name: debug grepout debug: # msg: "this is the version {{ vername.files.path }}" var: *files_found_path* tags: vern Output: files_found_path": [ "/opt/confluent-7.2.5/kafka/share/java/kafka/kafka_2.13-*7.2.5* -ccs.jar" ] Above code is

Re: [ansible-project] why lineinfile not able to run with item.path

2023-05-01 Thread Sameer Modak
10/kafka/log4j.properties', line: > 'log4j.appender.kafkaAppender.MaxBackupIndex=10' } > - { path: '/etc/kafka/confluent-7.2.5/kafka/log4j.properties', line: > 'log4j.appender.kafkaAppender.MaxBackupIndex=10' } > > > > Walter > -- > Walter Rowe, Division Chief >

Re: [ansible-project] why lineinfile not able to run with item.path

2023-05-01 Thread Sameer Modak
ypo since the error message reads '*Destination > { item.path }} does not exist !*' which is missing a starting curling > bracket. > > Your playbook works fine though. > > On Mon, May 1, 2023 at 8:25 AM Sameer Modak wrote: > >> Code==> >> >> - n

[ansible-project] why lineinfile not able to run with item.path

2023-05-01 Thread Sameer Modak
Code==> - name: insert logggin file in log4j protperties lineinfile: path: '{{ item.path }}' insertafter: 'log4j.appender.kafkaAppender.layout.ConversionPattern=*' line: '{{ item.line }}' with_items: - { path:

Re: [ansible-project] how fetch remore server /etc/ directories using ansible

2021-11-22 Thread Sameer Modak
/posix/synchronize_module.html > > On Sun, 21 Nov 2021 at 15:45, Sameer Modak wrote: > >> how fetch remore server /etc/ directories using ansible >> >> I tried using fetch module but it only does with files. We need exactly >> same as what fetch doing but with all the

[ansible-project] how fetch remore server /etc/ directories using ansible

2021-11-21 Thread Sameer Modak
how fetch remore server /etc/ directories using ansible I tried using fetch module but it only does with files. We need exactly same as what fetch doing but with all the files and directories. on control machine we expect it should create directories with hostname and data in it -- You

[ansible-project] how to fetch substring from vairbale or ansible vriable or facts

2020-08-14 Thread Sameer Modak
Hello Team, How can we check if variable demo01 has 01 in it in ansible. i have server with hostanme server01 and server02 i want some task to be applied to only 01 machines how can i do it. -- You received this message because you are subscribed to the Google Groups "Ansible Project"

[ansible-project] unable to ping windows machine using ansible

2018-02-18 Thread Sameer Modak
Below is the configuration and its corresponding error, [windows] 192.168.1.102 [windows:vars] ansible_ssh_user=smodak ansible_ssh_pass=** ansible_ssh_port=5986 ansible_connection=winrm ansible_winrm_server_cert_validation=ignore =

[ansible-project] how to see only cifs mount on all server using ansible

2017-12-24 Thread Sameer Modak
how can we see all cifs mount on each server using ansible -- 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

[ansible-project] how to get only and only command output in ansible playbook

2017-11-07 Thread Sameer Modak
Hello Team, Whenever i run my playbook, it gives me below output which i do not want i just want standard output or standard error. --- - hosts: all remote_user: ansible become: yes become_method: sudo gather_facts: no tasks: - name: dislpyname command:

[ansible-project] Re: disable unnecessary output on ansible server console

2017-08-21 Thread Sameer Modak
Thnks mike. On Monday, August 21, 2017 at 7:11:56 PM UTC+5:30, Mike Klebolt wrote: > > Uncomment the stdout_callback line. The Skippy callback plugin gives > pretty clean output. > > > On Friday, August 18, 2017 at 10:25:08 AM UTC-5, Sameer Modak wrote: >>

[ansible-project] with_items loops saying item undefined even if its present in parameter

2017-08-21 Thread Sameer Modak
hosts: all tasks: - name: "install EPEL and Remi reps" yum_repository: name: "{{ item.href }}" basurl: "{{ item.repo }}" with_items: - { href: "http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm;, repo: "/etc/yum.repos.d/epel.repo" }

[ansible-project] if one package fails all other non dependent packages installation fails in ansible

2017-08-20 Thread Sameer Modak
TASK [get python-yum and python-curl] * ...ignoring failed: [192.168.211.131] (item=[u'python-pycurl', u'git', u'curl', u'php5-common', u'php5-cli', u'php5-mysql',

[ansible-project] why debug is considered as task and needs - while other can run under single -name

2017-08-18 Thread Sameer Modak
When i execute below code it does not run it give error. hosts: all tasks: - name: "show version" setup: filter="*version" - name: "status of service" shell: "/usr/sbin/service auditd status" - name: "register demo" shell: cat /etc/redhat-release register: release

[ansible-project] Re: disable unnecessary output on ansible server console

2017-08-18 Thread Sameer Modak
in your #display_args_to_stdout = False [root@hackerdev 6.2]# On Friday, August 18, 2017 at 1:26:39 AM UTC+5:30, Mike Klebolt wrote: > > What do you have in your ansible.cfg for stdout_callback? > > On Thursday, August 17, 2017 at 9:13:25 AM UTC-5, Sameer Modak wrote: >> >&g

[ansible-project] disable unnecessary output on ansible server console

2017-08-17 Thread Sameer Modak
Hello Team, When i run following command i get log of output on screen. I just want if it success or failed. ansible web -m yum -a "name=MySQL-python state=present". 192.168.211.129 | SUCCESS => { "changed": true, "msg": "", "rc": 0, "results": [ "Loaded plugins:

[ansible-project] why handers sub topic is not indented same like tasks or vars

2017-08-16 Thread Sameer Modak
How understand and practice correct way of yml or indentation, so confusing - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version > here no extra spaces like in handlers tag yum: name=httpd

Re: [ansible-project] "one of the following is required: name,list while executing handlers"

2017-08-13 Thread Sameer Modak
Thanks Kai let for htis On Thursday, August 10, 2017 at 11:02:11 PM UTC+5:30, Kai Stian Olstad wrote: > > On 10. aug. 2017 12:49, Sameer Modak wrote: > > This is tasks main.yml > > vi roles/basic/tasks/main.yml > > > > - name: "Installing VIM and NTP&q

Re: [ansible-project] playbook to restart node if uptime is greater than 100 days

2017-08-13 Thread Sameer Modak
:30, Kai Stian Olstad wrote: > > On 10. aug. 2017 11:25, Sameer Modak wrote: > > I could rit playbook to get uptime but how we can take action on the > output > > received from ansible. > > how we can grep days from below output and rit restart code for the >

[ansible-project] "one of the following is required: name,list while executing handlers"

2017-08-10 Thread Sameer Modak
We are getting "one of the following is required: name,list" error on executing handlers on non sles servers skipping: [NESSTDDB01] => (item=ntp) skipping: [NESSTDDB01] => (item=vim) failed: [NESLTR10AJAWA01] (item=vim) => {"failed": true, "item": "vim", "msg": "one of the following is

[ansible-project] playbook to restart node if uptime is greater than 100 days

2017-08-10 Thread Sameer Modak
I could rit playbook to get uptime but how we can take action on the output received from ansible. how we can grep days from below output and rit restart code for the same. ok: [NESSTDDB01] => { "result.stdout": " 12:03pm up 343 days 16:57, 1 user, load average: 5.15, 5.37, 5.21" If

[ansible-project] Re: if one task fails on same node ansible does not execute any further task even they are working properly on it

2017-08-09 Thread Sameer Modak
Hello Guyz, I have got the answer its ignore_errors which does the work. On Saturday, August 5, 2017 at 11:00:12 PM UTC+5:30, Sameer Modak wrote: > > Hello Team, > > > > Below is the case where in first attempt when zypper code was on put first > before all other tasks

[ansible-project] if one task fails on same node ansible does not execute any further task even they are working properly on it

2017-08-05 Thread Sameer Modak
Hello Team, Below is the case where in first attempt when zypper code was on put first before all other tasks, It failed to excute register and copy task on [neslds12ainfo01],[NESLTR10AJAWA01] as previous zypper task failed it did not try to execute the valid task on it. Note: (Zypper task

[ansible-project] not able to find output of shell command

2017-07-29 Thread Sameer Modak
This is my yml file which is working fine for zypper commands but unable to see output for /etc/motd file. How to see the output [smodak@hel-shell-2 ~]$ vi roles/basic/tasks/main.yml - name: "Installing VIM" zypper: name=vim state=present - name: "Installing chindi soft" zypper: name=vim

[ansible-project] module failure even for low privileges command

2017-07-29 Thread Sameer Modak
Here is the case, I want run this command on all servers, out of it one server does not have current user{smodak} in sudoers file. Due to switch it asks both the passwords one for ssh and another for sudo. For all remaining server s where sudo is required and rightly provided it works fine

Re: [ansible-project] ansible doubt

2017-07-29 Thread Sameer Modak
Thanks for clearing my doubts. This will encourage me to dig more. On Saturday, July 29, 2017 at 1:02:01 AM UTC+5:30, Kai Stian Olstad wrote: > > On 28. juli 2017 17:26, Sameer Modak wrote: > > when i run below command without -k switch it asks for one sudo password > >

Re: [ansible-project] ansible doubt

2017-07-28 Thread Sameer Modak
ssword or which does not. Also why even for /bin/date it requires sudo permission. Even it should run correctly on server where it does not have sudo permission as this command does not require sudo permission. On Friday, July 28, 2017 at 5:38:11 PM UTC+5:30, branko wrote: > > On Fri

[ansible-project] ansible doubt

2017-07-27 Thread Sameer Modak
Hello Team, Can some one tell me do we need user to b in /etc/sudoers file of all servers if we wish to execute /sbin/vgs command on all servers. also how can we we store global username password variable for ansible which is accesible for all other ansible components. -- You received this