Re: [ansible-project] Store Timestamp As A Constant Value

2021-10-27 Thread Todd Lewis
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

[ansible-project] Re: Troubles with conditions, register and loop

2021-10-27 Thread Todd Lewis
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

Fwd: Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread dulhaver via Ansible Project
> 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

[ansible-project] Troubles with conditions, register and loop

2021-10-27 Thread Leonardo Bacha
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:

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread Stefan Hornburg (Racke)
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

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread dulhaver via Ansible Project
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

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread dulhaver via Ansible Project
> 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

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread Antony Stone
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.

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread Jorge Rúa
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

Re: [ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread dulhaver via Ansible Project
* 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

[ansible-project] Fwd: Error :winrm ## The kind of connection which ansible will make with remote windows node' was not found"

2021-10-27 Thread Rajesh Varma
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

[ansible-project] installing postgres - error with initdb -D /path/to/pg_data

2021-10-27 Thread dulhaver via Ansible Project
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

[ansible-project] Need info on any known issues for a paramiko/ ansible version

2021-10-27 Thread Vikram S
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

Re: [ansible-project] Re: Not able to connect to the managed node

2021-10-27 Thread Komal Suthar
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

Re: [ansible-project] Re: Not able to connect to the managed node

2021-10-27 Thread Komal Suthar
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

[ansible-project] Re: Not able to connect to the managed node

2021-10-27 Thread Markus
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-project] Not able to connect to the managed node

2021-10-27 Thread Komal Suthar
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.

[ansible-project] How to fill netplan config file with routes via ansible

2021-10-27 Thread Markus
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 }} ..