Why would you need to check whether the connection plugin supports such a
new feature? ConnectionBase already has methods for _connect, connected,
reset and close, separate from exec_command, put_file and fetch_file
So wouldn't this work for all connection plugins if Ansible just starts
Hi,
This should help
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_strategies.html#ordering-execution-based-on-inventory
Regards
> On 12 Jul 2023, at 15:54, Sameer Modak wrote:
>
>
>
> Hello Team,
>
> We have a situation where we have to run same script on all 3
yeah, I saw that, and I might go down that road, but wanted to see if there
was a better way first.
--jp
On Wed, Jul 12, 2023 at 11:39 AM 'Rowe, Walter P. (Fed)' via Ansible
Project wrote:
> I think you can place an ansible.cfg file in the folder where your ansible
> is running. We do this for
I think you can place an ansible.cfg file in the folder where your ansible is
running. We do this for our packer image management service that also uses
ansible in the provisioner stage.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Jul 12, 2023,
Good Morning,
I manage the building of some virtual machine templates using packer. I
am leveraging ansible as part of this, and when I am doing some cleanup
after the setup is done to prepare for the conversion to template, and a
couple of the options I need in yum/dnf, etc don't exist in the
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
I get it . But this is specific case where my current process is not
managed by systemd so i had to use pkill anyways.
Now issue is shell module with if else is not working for me correctly.
Like its giving rc -9. if i copy same shell script and rung using shell
module like bash /tmp/zkproc.sh
Kind of, there is ansible-connection but it can be complicated. I've
been toying around with the idea of a 'persistent: no|yes' keyword to
allow for the use/reuse of persistent sessions. This would first look
at the connection plugin for support and fallback to a connection
Maybe you should be using the systemctl action "reload-or-restart"?
Killing service processes out from under systemd should not be a thing.
And as Dick Visser said, we're straying from Ansible issues.
To your other question:
Secondly, as its impossible to explore entire tool like ansible hence
On 12/07/2023 13: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,
[kafka-3: FAILED! => {"changed": true, "cmd": "if pkill --signal 9 -f zookeeper.properties ;
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,
>
> [kafka-3: FAILED! => {"changed": true, "cmd": "if pkill --signal 9 -f
> zookeeper.properties ; then\nsystemctl start
>
Infact I tried code pasted by still gives same error.
- name: Kill running java processes and start newly configured systemd
throttle: 1
#ignore_errors: yes
any_errors_fatal: true
shell: |
if pkill --signal 9 -f zookeeper.properties ; then
sleep 6
Hi Todd,
I tried to run script with shell module but it fails with below error,
[kafka-3: FAILED! => {"changed": true, "cmd": "if pkill --signal 9 -f
zookeeper.properties ; then\nsystemctl start
confluent-zookeeper510\nelse\nexit 1\nfi\nsystemctl status
confluent-zookeeper510\n", "delta":
> - for ssh connection plugin, the control persist settings are what reuse
connections/authentication, but not sessions
Is there a mechanism to re-use sessions? Or a mechanism to re-use
connections for non-ssh connection plugins?
Thanks,
Matt
Le jeudi 6 juillet 2023 à 03:24:03 UTC+10, Mark
First of all Thanks a lot for introducing me pkill way otherwise i would
have written one more task to register the process id.
Many thanks Todd.
Secondly, as its impossible to explore entire tool like ansible hence just
asking you the question, Does it even possible to do above things
15 matches
Mail list logo