I've done it like this. Perhaps this will be useful to you.
```
- hosts: all
tasks:
- name: Snarf the playbook start time on the first host.
# We'll use this time stamp on backup files in the next play.
set_fact:
ansible_playbook_starttime: "{{ ansible_date_time.date + ' at ' +
a
Your "Restarting services services¨ task should be looping over the
registered _results array, not {{ sysservices }}. Your sysservices has no
"rc". _result should have a list, one item per loop of the registering
task. It's that list you want to process.
On Wednesday, October 27, 2021 at 1:48:2
> On 10/27/2021 5:20 PM Stefan Hornburg (Racke) wrote:
>
>
> On 27/10/2021 17:11, dulhaver via Ansible Project wrote:
> > I figured out that apparently using ansible_become_user: root in the
> > defaults.yml is meesing things up
> >
> > Changing
> > ansible_become_user: root
> > to
> > ansibl
Hi guys,
I'm trying to create a lab file to restart a service only if it's running.
I have troubles when using variables, register and loop together.
- name: Restart a service only if it's active.
hosts: LAB
vars:
sysservices:
- serviceName: httpd
- serviceName: smb
tasks:
On 27/10/2021 17:11, dulhaver via Ansible Project wrote:
I figured out that apparently using ansible_become_user: root in the
defaults.yml is meesing things up
Changing
ansible_become_user: root
to
ansible_root_user: root
in the defaults file and the playbok makes this issue going away. Appare
I figured out that apparently using ansible_become_user: root in the
defaults.yml is meesing things up
Changing
ansible_become_user: root
to
ansible_root_user: root
in the defaults file and the playbok makes this issue going away. Apparently
the term ansible_become_user is more then just a stri
> On 10/27/2021 4:47 PM Antony Stone
> wrote:
>
>
> On Wednesday 27 October 2021 at 15:32:45, dulhaver via Ansible Project wrote:
>
> > * here is the entire playbook https://pastebin.com/edit/9Uvjdupe
>
> Just remove the word "edit/" from that first URL.
sorry, yes: https://pastebin.com/9
On Wednesday 27 October 2021 at 15:32:45, dulhaver via Ansible Project wrote:
> * here is the entire playbook https://pastebin.com/edit/9Uvjdupe
Just remove the word "edit/" from that first URL.
Antony.
--
Some mistakes are too much fun to make only once.
Hey!
We can't access the playbook here - https://pastebin.com/edit/9Uvjdupe at
least I can't. pastebin redirects me to the login page. I can however
access default_postgres.yml file
I'm going to assume you are using sudo as become_method. I am also going to
assume selinux is not part of the issue
* here is the entire playbook https://pastebin.com/edit/9Uvjdupe
* here is the defaults_postgres.yml https://pastebin.com/ZKjis1BA I refer to in
it
I am wondering whether the use of a ...
* ansible_become_user: root
* ansbile_postgres_user: postgres
... in the same context may be related to my pro
Hello Techies,
I am learning the ansible on windows 10.
I have configure the ubuntu and ansible on my laptop.
Now i am trying to connect the windows from ubuntu .. i am getting the
below error message
ansible windows -m win_ping -i ansible/Inventory/Servers.ini --list-hosts
My Server inventory
I have a playbook to install postgresql on a rhel8 target
one TASK should start the initdb process ...
\\\
- name: configure postgres - create database
command: "{{ post
Hi,
I am using ansible 2.10.8 with python 3.9.2 and running ansible on Windows
subsystem for linux (debian linux). Pramiko version is paramiko==2.7.2.
I am seeing some network modules freezing for no apparent reason. Please
refer to this post for details
(https://groups.google.com/g/ansible-pr
Got it thanks.
On Wed 27 Oct, 2021, 3:38 PM Komal Suthar,
wrote:
> Hello,
>
> Cool, but using yum I'm not able to install sshpass package!
>
> On Wed 27 Oct, 2021, 3:29 PM Markus, <
> m.lauterb...@neue-digitale-horizonte.de> wrote:
>
>> Hi Komalsuth,
>>
>> you need to install sshpass localy
Hello,
Cool, but using yum I'm not able to install sshpass package!
On Wed 27 Oct, 2021, 3:29 PM Markus, <
m.lauterb...@neue-digitale-horizonte.de> wrote:
> Hi Komalsuth,
>
> you need to install sshpass localy on your ansible "master" node - not on
> the target node.
>
> Hope it helps.
>
> M
Hi Komalsuth,
you need to install sshpass localy on your ansible "master" node - not on
the target node.
Hope it helps.
Markus
komalsuth...@gmail.com schrieb am Mittwoch, 27. Oktober 2021 um 11:32:03
UTC+2:
> ansible all -m ping
> SSH password:
> 192.168.99.115 | FAILED! => {
> "msg": "
ansible all -m ping
SSH password:
192.168.99.115 | FAILED! => {
"msg": "to use the 'ssh' connection type with passwords, you must
install the sshpass program"
}
This is the error msg I'm getting while connecting to the rhel v6.10
managed node. Even there all the openssh packages are installed.
I'm trying to manage netplan by using ansible. That worked well in the
past, where I used the a static template. Now I have to add several lines
to the route section:
... bridges:
. br0:
... routes:
- to: 0.0.0.0/0
.. via: {{ ansible_default_ipv4.gateway }}
..
18 matches
Mail list logo