Re: [ansible-project] become sudo not working for apt module

2024-05-13 Thread Stefan Hornburg (Racke)
On 14/05/2024 04:42, Gregory Machin wrote: Hi I have a number of ubuntu servers that I want to update using ansible via AWX. my current test playbook : ---  - hosts: all    tasks:    - name: Test Connection      ansible.builtin.ping:    - name: Update Cache      become: true      apt:

Re: [ansible-project] Get_url

2024-04-10 Thread Stefan Hornburg (Racke)
On 10/04/2024 09:55, Prady A wrote: Thanks dick Yes by default those commands doesn’t comes oob. Tried with verbosity mode. Request failed:” It is possible that the SSL setup on the target is too old. You could check that with the "testssl" script from the controller (https://testssl.sh/).

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

2023-07-12 Thread Stefan Hornburg (Racke)
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 ;

Re: [ansible-project] how to parse variable in patterns by find module

2023-03-13 Thread Stefan Hornburg (Racke)
On 13/03/2023 17:39, Hiero-nymo wrote: Hi everyone, I've tried to using a variable in find module by pattern by it doesn't seems to work. Here's below a example. I also looked at another solution with set_facts but I doesn't run too. I want to list all the backup files in a directory. The

Re: [ansible-project] I want to show the group variables, looping over all groups

2023-02-08 Thread Stefan Hornburg (Racke)
On 08/02/2023 09:58, Norbert Klamann wrote: Yes of course , it should look  like this ``` all                   - "alle interessierenden Hosts, auch nicht per ansible kontrollierbare" controllable          - Alle Hosts, die mit ansible kontrolliert werden koennten fm174                 - Alle

Re: [ansible-project] I want to show the group variables, looping over all groups

2023-02-08 Thread Stefan Hornburg (Racke)
On 08/02/2023 09:21, Norbert Klamann wrote: Hello all, i use Ansible to document and manage a small network of computers and other devices. So I bulit an inventory with several groups and hosts and defined a bunch of variables  on each level to describe what i want to achieve,  Each host and

Bug#961884: add init script / systemd unit for clamonacc background scanner

2023-01-18 Thread Stefan Hornburg (Racke)
On 18/01/2023 21:59, Sébastien Villemot wrote: On Tue, 29 Jun 2021 22:08:31 +0200 Sebastian Andrzej Siewior wrote: On 2020-05-30 19:53:49 [+], Patrick Schleizer wrote: package clamav-daemon ships a file /usr/bin/clamonacc which is a background virus scaning guard / real-time protection.

[Pkg-clamav-devel] Bug#961884: add init script / systemd unit for clamonacc background scanner

2023-01-18 Thread Stefan Hornburg (Racke)
On 18/01/2023 21:59, Sébastien Villemot wrote: On Tue, 29 Jun 2021 22:08:31 +0200 Sebastian Andrzej Siewior wrote: On 2020-05-30 19:53:49 [+], Patrick Schleizer wrote: package clamav-daemon ships a file /usr/bin/clamonacc which is a background virus scaning guard / real-time protection.

Re: [ansible-project] why does this loop/when fail

2022-11-21 Thread Stefan Hornburg (Racke)
On 21/11/2022 14:01, rjwagn...@gmail.com wrote: Wow.  Never would have thought to try that.  Escaping in YAML/Jinja is such an unintuitive mess.  Thanks so much, Andrew. It is easier though when you use single quotes for the arguments of the regex_replace filter. Regards    Racke

Re: [ansible-project] Archiving user home directories with a var_files

2022-11-01 Thread Stefan Hornburg (Racke)
On 01/11/2022 18:42, Kenady Inampudi wrote: even with loop: "{{ users }}"  there is no difference I think you need to loop over {{ user }} and in path/dest use {{ item }}, the default loop variable. Regards     Racke archive_home_dir.yml --- - hosts: all   tasks:      - archive:      

Re: [ansible-project] Doing su -c 'ssh {{ ssh_peer }}'

2022-10-13 Thread Stefan Hornburg (Racke)
On 12/10/2022 21:19, Axel Rau wrote: If I install sudo, this seems to work: - - - shell: sudo -u {{ sk_user }} ssh {{ ssh_peer }} date - - - Ansible can do the privilege escalation to an arbitrary user as well:   command: ssh {{ ssh_peer }} date   become_user: "{{ sympa_unix_user }}"   vars:

Re: [ansible-project] Re: Ansible dict date to csv file

2022-09-10 Thread Stefan Hornburg (Racke)
On 10/09/2022 18:44, Sagan wrote: IF you have your closters has dicts in your variable you can use a loop with dict2items and loop around it, as to writing it in your file you can use this module https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Using

Bug#1019421: Improper permission for sympa.log after logrotate-ing

2022-09-09 Thread Stefan Hornburg (Racke)
On 09/09/2022 06:19, IKEDA Soji wrote: Package: sympa Version: 6.2.68~dfsg Severity: important After run of logrotate, permission of /var/log/sympa.log is set as: -rw-r- sympa sympa and therefore logging is no longer possible. I suppose this is because /etc/logrotate.d/sympa contains   

Re: [ansible-project] Lineinfile - Remove line if the regexp match but the variable inside item is not defined.

2022-08-08 Thread Stefan Hornburg (Racke)
On 08/08/2022 14:19, farrukh ahmed wrote: Hello Team, Hope you all are doing well. I'm stuck at lineinfile module. how to check if a variable inside each item is defined then add the line in the file, otherwise if the regex found the match in the remote host file but the variable inside an

Re: [ansible-project] Lineinfile - Skip/Update an item inside "with_items" using conditions

2022-08-05 Thread Stefan Hornburg (Racke)
On 05/08/2022 13:31, farrukh ahmed wrote: Thanks for your reply Vladimir Botka. This is my actual case:  defaults > main.yml --- # defaults file for redis_configs redis_config_path: /etc/redis/redis.conf # Default Params Values MAX_MEM: 3000 TCP_KEEPALIVE: 0 TCP_BACKLOG: 511 MAX_CLIENTS:

Re: [ansible-project] Unarchive module

2022-08-03 Thread Stefan Hornburg (Racke)
On 03/08/2022 17:21, rajthecomputerguy wrote: Hi Team, below code failing. Any help would be appreciated - name: unarchive the patch    unarchive:        src: ***        dest: **        remote_src: yes zip file is 1.5 gb  error is  msg: "fail to connect host to host vis

Re: [ansible-project] moving a folder on a remote whether it exists

2022-07-27 Thread Stefan Hornburg (Racke)
On 27/07/2022 13:11, dulhaver via Ansible Project wrote: On 07/27/2022 11:09 AM CEST Stefan Hornburg (Racke) wrote: On 27/07/2022 10:33, dulhaver via Ansible Project wrote: I am trying to rename/move a folder on a remote host and try to do this based on whether it exists That doesn't

Re: [ansible-project] moving a folder on a remote whether it exists

2022-07-27 Thread Stefan Hornburg (Racke)
On 27/07/2022 10:33, dulhaver via Ansible Project wrote: I am trying to rename/move a folder on a remote host and try to do this based on whether it exists That doesn't look like a proper path: "path": " /opt/db/backup/postgres/backups ". Also it doesn't coincide with your playbook.

Re: [ansible-project] 'copy' TASK won't copy a file - eventhough reporting 'ok'

2022-07-14 Thread Stefan Hornburg (Racke)
On 14/07/2022 15:41, dulhaver via Ansible Project wrote: I have a TASK that should copy *~/files/repo_pgbackrest.conf* to the remote as */etc/pgbackrest/pgbackrest.conf* (note the differing file name). however, despite that fact playbook exection returns an 'ok' an that TASK, the file is *not

Re: [ansible-project] Unable to create the partition

2022-07-08 Thread Stefan Hornburg (Racke)
On 08/07/2022 10:04, Ashok Reddy wrote: Hi, I am trying to create the partition, but got the following error: I think that the error message is clear about the problem. The device doesn't exist. Regards Racke --- - hosts: default   become: true   become_method: sudo  

Re: [ansible-project] Unable to execute ansible playbook

2022-07-07 Thread Stefan Hornburg (Racke)
959.6394126-3019-148910985051576 `\" ), exited with result 142, stdout output: Please login as the user \"cloud-user\" rather than the user \"root\".\n\n", "unreachable": true} PLAY RECAP ******** ansible_user=cloud-user: ok=0changed=0unreacha

Re: [ansible-project] Unable to execute ansible playbook

2022-07-07 Thread Stefan Hornburg (Racke)
The error appears to be in '/root/modsec-compile.yml': line 2, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: --- - hosts: default ^ here On Thu, Jul 7, 2022 at 1:43 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de>>

Re: [ansible-project] Unable to execute ansible playbook

2022-07-07 Thread Stefan Hornburg (Racke)
On 07/07/2022 10:05, Ashok Reddy wrote: the same issue happens even I have provided with -K argument: You need to login as the cloud-user and use privilege escalation (https://docs.ansible.com/ansible/latest/user_guide/become.html) to execute the tasks as root user. ansible_user: cloud-user

Re: [ansible-project] ansible output not shown

2022-06-19 Thread Stefan Hornburg (Racke)
On 19/06/2022 14:08, High Raccoon wrote: also, the hostname is altered. Try hosts: "test1-host:test2-host" Regards Racke воскресенье, 19 июня 2022 г. в 17:07:49 UTC+5, High Raccoon: it's a host, not a group. воскресенье, 19 июня 2022 г. в 02:49:01 UTC+5,

Re: [ansible-project] ssh issue over non root account

2022-06-16 Thread Stefan Hornburg (Racke)
On 15/06/2022 17:58, Dick Visser wrote: Your course should mention that SSH access is a requirement for the course :) In any case as you pointed out it's not really an ansible specific problem but rather a generic system administration issue. Read

Re: [ansible-project] sudo privilege's are not working

2022-06-14 Thread Stefan Hornburg (Racke)
On 14/06/2022 10:21, 'Shivakumar Venkataswamy' via Ansible Project wrote: ansible is user account we created and member of  sudor's ( /etc/sudoers) with full privileges' same as root. IMHO the privileges are only the same when using the "sudo" command. Regards   Racke On

Re: [ansible-project] sudo privilege's are not working

2022-06-14 Thread Stefan Hornburg (Racke)
On 14/06/2022 09:16, 'Shivakumar Venkataswamy' via Ansible Project wrote: Hi team,  look at my playbook --- -  hosts: all    become: true    become_user: ansible    tasks:    - name: add a user to the list of AllowUsers if not present      vars:        usernames:           -

Re: [ansible-project]

2022-06-13 Thread Stefan Hornburg (Racke)
On 13/06/2022 13:38, 'Walter Rowe' via Ansible Project wrote: Then that /home/yum.repos.d must be on the control host running the ansible playbook. The copy task always copies from local to remote. That is not correct: remote_src: yes Regards    Racke On Monday, June 13, 2022

Re: [ansible-project]

2022-06-13 Thread Stefan Hornburg (Racke)
On 13/06/2022 13:17, 'Walter Rowe' via Ansible Project wrote: yum.repos.d is in /etc .. not /home .. not sure how its getting that path. >     - name: Copying the Directory and its contents >       copy: >         src: /home/yum.repos.d Regards Racke On Monday, June 13, 2022 at 7:14:50 AM

Re: [ansible-project]

2022-06-13 Thread Stefan Hornburg (Racke)
On 13/06/2022 11:28, 'Shivakumar Venkataswamy' via Ansible Project wrote: Hi team, I'm facing   "Source /home/yum.repos.d not found" error while running playbook .. my playbook view like this .. please help out. I suppose this directory is either missing on the remote machine or the ansible

Re: [ansible-project] Running Ansible playbook using AWS Systems Manager (skipping: no hosts matched)

2022-06-10 Thread Stefan Hornburg (Racke)
, Prasanth Hello Pransath, you are using -i localhost in the playbook command, maybe that's the problem? Regards    Racke On Fri, Jun 10, 2022 at 9:53 AM Stefan Hornburg (Racke) wrote: On 10/06/2022 10:49, Prasanth S Nair wrote: > Hi Dick. > > I

Re: [ansible-project] Running Ansible playbook using AWS Systems Manager (skipping: no hosts matched)

2022-06-10 Thread Stefan Hornburg (Racke)
On 10/06/2022 10:49, Prasanth S Nair wrote: Hi Dick. I also get the below warning message: [WARNING]: Could not match supplied host pattern, ignoring: dev Where did you define that host group? Regards     Racke On Thu, Jun 9, 2022 at 3:14 PM Prasanth S Nair wrote: Hi

Re: [ansible-project] LDAP setup??

2022-06-09 Thread Stefan Hornburg (Racke)
On 10/06/2022 06:48, 'Shivakumar Venkataswamy' via Ansible Project wrote: Hi.. I'm facing this kind issue while running this playbook. Looks like you have a typo in the command line options: "authconfig: error: no such option: --enableforcelegancy"], Regards     Racke  PLAYBOOK:

Re: [ansible-project] Playbook structure

2022-05-12 Thread Stefan Hornburg (Racke)
On 12/05/2022 12:57, Marc Haber wrote: Hi Dirk, On Tue, May 10, 2022 at 08:30:13AM +0200, Dick Visser wrote: On 2022-05-09 (Mon) 22:06, Marc Haber wrote: after using ansible for quite a while, my project to manage my own servers has grown to a respectable size. I was a puppet user before, so

Re: [ansible-project] Playbook structure

2022-05-12 Thread Stefan Hornburg (Racke)
On 09/05/2022 22:06, Marc Haber wrote: Hi, after using ansible for quite a while, my project to manage my own servers has grown to a respectable size. I was a puppet user before, so I have a single big playbook containing everything. I have the feeling this is like holding ansible wrong, and I

Re: [ansible-project] Define hostname for group based on index+1

2022-04-15 Thread Stefan Hornburg (Racke)
On 15/04/2022 12:45, dudu.c...@gmail.com wrote: First of all thank you - it works. But, can i spare  the following definition  ? *groups['web-server']* Basically in the begging of the playbook I'm defining the group under hosts - hosts: web-server You could try ansible_play_hosts instead.

Re: [ansible-project] Define hostname for group based on index+1

2022-04-15 Thread Stefan Hornburg (Racke)
On 15/04/2022 09:18, dudu.c...@gmail.com wrote: Hi, I have X amount of server inside a defined group (For example - web server) I want to loop the server a define there hostname based on index+1 For example, if the group have 3 server , so server one should be "web-server1" , second ,

Re: [ansible-project] How ansible vault is safe when using scripts?

2022-03-22 Thread Stefan Hornburg (Racke)
On 22/03/2022 12:05, R Batchen wrote: Hey, I dont understand how ansible vault is safe if i want to use in a script  i need to give ansible the file where the password  is saved in plain text.. so i dont get it i do get it being safe if i do a prompts for the password with --ask-vault-pass but

Re: [ansible-project] ansible.builtin.apt - Updating all installed packages to latest gives "parameters are mutually exclusive deb|package|upgrade

2022-03-21 Thread Stefan Hornburg (Racke)
On 19/03/2022 01:05, John Himpel wrote: The following ansible block: - name: Block update APT hosts   block:     - name: main - Update APT repo and cache       ansible.builtin.apt:         update_cache: true         force_apt_get: true         cache_valid_time: 3600   # 1 Hour     -

Re: [ansible-project] Re: create a dict from a list (value of another dict)

2022-03-16 Thread Stefan Hornburg (Racke)
On 16/03/2022 17:46, Hiero-nymo wrote: I've try some subelements but cannot retrieve the right data. ie I don't get why you use the dict2items filter on a list of dicts. You can start producing output from the "linux_file_list" variable directly. Regards Racke On Wednesday, March

Re: [ansible-project] Ansible private key passphrase

2022-03-14 Thread Stefan Hornburg (Racke)
On 14/03/2022 04:09, Dip Giri wrote: How to use private key passphrase in ansible inventory file What about using ssh agent on the controller machine and add that key with ssh-add? Regards Racke -- You received this message because you are subscribed to the Google Groups "Ansible

Re: [ansible-project] how to execute playbook task on Host-B directly from control machine

2022-03-13 Thread Stefan Hornburg (Racke)
On 12/03/2022 19:17, Dip Giri wrote: First i have to connect *Host-A*then i can connect *Host-B*. i can’t connect Host-B directly. So in this case how to execute playbook task on *Host-B *from *Control Machine. *Because my control machine is centralised where have running *Ansible AWX. * and

Re: [ansible-project] Run playbook against multiple hosts

2022-03-01 Thread Stefan Hornburg (Racke)
On 01/03/2022 16:51, Nitrous wrote: I have defined my hosts in the variable file: [servers] server1 ansible_host=ip address of server 1 server2 ansible_host=ip address of server 2 etc I have a playbook that looks like this: - hosts: '{{ hostname }}'   gather_facts: no   tasks:   - name:

Bug#1005823: Use restart on-failure for WWSympa and SOAP systemd units

2022-02-15 Thread Stefan Hornburg (Racke)
package: sympa version: 6.2.66~dfsg-2 "on-failure" seems to be the recommended mode for the Restart directive. Regards Racke -- Automation expert - Ansible and friends Linux administrator & Debian maintainer Perl Dancer & conference hopper OpenPGP_signature Description: OpenPGP

Re: [ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread Stefan Hornburg (Racke)
args:         chdir: /opt/app/automation         executable: /bin/bash       register: output     - name: ouput       debug:         var: output.stdout On Thu, Feb 10, 2022 at 11:56 AM Stefan Hornburg (Racke) mailto:ra...@linuxia.de>> wrote: On 10/02/2022 14:48, SysAdmin EM wrote:

Re: [ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread Stefan Hornburg (Racke)
On 10/02/2022 14:48, SysAdmin EM wrote: Hello, I’m trying to run a playbook which executes a shell script in a remote instance. Playbook --- - name: Test SH   hosts: schedule-dev   become: yes   gather_facts: no   tasks:     - name: Test Shell Ansible       shell: |         sh

Re: [ansible-project] Re: Getting Timed Out Error when running the playbook using `vagrant provision`

2022-02-03 Thread Stefan Hornburg (Racke)
uses 172.30.240.1. Again: *Vagrant didn't setup **172.30.240.1 properly* Regards    Racke On Thu, Feb 3, 2022 at 6:59 PM Stefan Hornburg (Racke) wrote: On 03/02/2022 14:22, arjungoel 1995 wrote: > `vagrant ssh` is working but when I tried to run the playbook using `ansi

Re: [ansible-project] Re: Getting Timed Out Error when running the playbook using `vagrant provision`

2022-02-03 Thread Stefan Hornburg (Racke)
with both ways? What does `vagrant ssh-config` say?  Does it use the IP 172.30.240.1? I don't think so. Looks like Vagrant didn't set up the IP properly. Regards Racke Thanks On Thu, Feb 3, 2022 at 6:21 PM Stefan Hornburg (Racke) wrote: On 03/02/2022 13:47, arjungoel 1995

Re: [ansible-project] Re: Getting Timed Out Error when running the playbook using `vagrant provision`

2022-02-03 Thread Stefan Hornburg (Racke)
On 03/02/2022 13:47, arjungoel 1995 wrote: Hi, I tried to ping the port and IP address using SSH and getting timeout error. Can you please help me how to fix this? image.png Does "vagrant ssh" work? Regards Racke On Thu, Feb 3, 2022 at 5:37 PM Roberto Paz wrote: Have

Re: [ansible-project] multiple vm playbook

2022-02-02 Thread Stefan Hornburg (Racke)
On 02/02/2022 19:50, Rene Paquin wrote: I am attempting to create a playbook to deploy multiple linux  VMs from a template and assigning a static ip and I am running into issues.  My playbook: --- - hosts: localhost   gather_facts: no   vars_files:     - group_vars/vars     -

Re: [ansible-project] Getting jsondiff is not installed error even though jsondiff is installed

2022-02-02 Thread Stefan Hornburg (Racke)
On 02/02/2022 18:09, Nick Plichta wrote: Getting fatal: [192.168.0.51]: FAILED! => {"changed": false, "msg": "jsondiff is not installed, try 'pip install jsondiff'"} error on fresh ansible install on ubuntu 20.04 via apt. Additionally I installed python3-jsondiff and community.docker from

Bug#1004682: src:pure-ftpd: fails to migrate to testing for too long: uploader built arch:all binaries

2022-01-31 Thread Stefan Hornburg (Racke)
On 31/01/2022 19:39, Paul Gevers wrote: Source: pure-ftpd Version: 1.0.49-4.1 Severity: serious Control: close -1 1.0.50-2 Tags: sid bookworm pending User: release.debian@packages.debian.org Usertags: out-of-sync Dear maintainer(s), The Release Team considers packages that are out-of-sync

Bug#1004682: src:pure-ftpd: fails to migrate to testing for too long: uploader built arch:all binaries

2022-01-31 Thread Stefan Hornburg (Racke)
On 31/01/2022 19:39, Paul Gevers wrote: Source: pure-ftpd Version: 1.0.49-4.1 Severity: serious Control: close -1 1.0.50-2 Tags: sid bookworm pending User: release.debian@packages.debian.org Usertags: out-of-sync Dear maintainer(s), The Release Team considers packages that are out-of-sync

Re: [ansible-project] Creating a string, containg a ':'

2022-01-26 Thread Stefan Hornburg (Racke)
On 26/01/2022 19:47, Axel Rau wrote: Hi all, seems to be an FAQ item but I can’t find the solution. (Try to create sorce args for rsync): set_fact: the_arg: ':{{ some_var }}' So what's the problem with that? Regards Racke Any help welcome, Axel --- PGP-Key: CDE74120 ☀

Re: [ansible-project] roles - apply variable values from /defaults/main.yml

2022-01-20 Thread Stefan Hornburg (Racke)
On 20/01/2022 19:47, dulhaver via Ansible Project wrote: so, that is a clear yes (and great little exercise) then. I'll have to figure out, why it does't work atm thx for sharing Well to get help you need to elaborate on "why it does't work atm". The variables in defaults/main.yml do have

Re: [ansible-project] is ~/.bashrc of a become_user read upon TASK execution?

2022-01-19 Thread Stefan Hornburg (Racke)
On 19/01/2022 11:34, dulhaver via Ansible Project wrote: can anybody tell me whether the ~/.bashrc of a become_user is being read on TASK execution, so you could rely on aliases, environment variables or PATH to be effective? As far as know it is not being read. And I doubt that is a good

Re: [ansible-project] Help with acme_certificate / letsencrypt and empty challenge_data

2022-01-18 Thread Stefan Hornburg (Racke)
On 18/01/2022 18:52, Parth Patel wrote: How inventory_hostname would contain domain ? If you put foo.example.com into the inventory, the inventory_hostname would include the domain example.com. Regards Racke Its just a special variable pre defined in ansible which contains name of

Re: [ansible-project] Trick to remove a backslash liternal in Ansible?

2022-01-14 Thread Stefan Hornburg (Racke)
On 14/01/2022 16:17, Jibun no Kage wrote: New to Ansible, having trouble doing the following:  shell command returns a "This is a test\u" string.  I can't seem to find a way to trim the '\u'.  Since it seem to be tricking to remove a backslash literal in Ansible? The following would

Re: [ansible-project] Odd results from query of /proc/meminfo?

2022-01-14 Thread Stefan Hornburg (Racke)
On 14/01/2022 18:23, Jibun no Kage . wrote: Odd results from query of /proc/meminfo? When I do the following from shell... # cat /proc/meminfo | grep MemTotal MemTotal:    8087276 kB But when I do the same via Ansible... ok: [192.168.1.212] => {     "msg": "Pi Memory Total: MemTotal:  

Re: [ansible-project] include_roles, with tags from a dictionary loop?

2022-01-11 Thread Stefan Hornburg (Racke)
On 11/01/2022 15:53, dkol...@olearycomputers.com wrote: Hey; I'm having difficulty coming up with the right syntax to add/include roles, with tags, from a loop such that I can limit execution to specific tags. Hello, in my opinion tags should be use to control the playbook flow and not to

Re: [ansible-project] how can i get around this error?

2021-12-30 Thread Stefan Hornburg (Racke)
On 30/12/2021 09:16, Kerem Kalayci wrote: Hi everyone, i'm newbie at ansible yml. I am trying to run a command like below. But I am getting an error as below. where am i doing wrong? - gather_facts: False   name: LINGO'da komut   hosts: xxx   remote_user: xxx   tasks:     - name: Run

Re: [⚠️] Re: [ansible-project] Print stout of failed task in recap

2021-12-24 Thread Stefan Hornburg (Racke)
On 25/12/2021 08:28, 'Jitender J' via Ansible Project wrote: Hello, Done some changes in callback module OK, you can get the stdout value by saving it with register task parameter. Regards Racke On Sat, 25 Dec, 2021, 12:27 PM Stefan Hornburg (Racke), mailto:ra...@linuxia.de

Re: [ansible-project] Print stout of failed task in recap

2021-12-24 Thread Stefan Hornburg (Racke)
On 24/12/2021 15:13, 'Jitender J' via Ansible Project wrote: Hi Team, Hope everyone is doing good, I am wondering if there is a way to print stdout of a failed task in playbook recap PLAY RECAP

Re: [ansible-project] Switch Interface UP then playbook should end with error msg

2021-12-23 Thread Stefan Hornburg (Racke)
On 23/12/2021 11:54, Akshay Jadhav wrote:    - name: show message if interface is not down      fail:       msg: "Interface is not down"      when: {{ interface }}.operstatus == "up" will this work? Definitely not, that is pulled from thin air if you ask me. Try that: when:

Re: [⚠️] Re: [ansible-project] Shell Module Code Not Executing

2021-12-23 Thread Stefan Hornburg (Racke)
On 23/12/2021 09:44, 'Jitender J' via Ansible Project wrote: Hi Below is the piece of code I am trying to execute, it is running fine over 500 nodes but there are some hosts in different environments where ansible not executing the code inside the shell module Problems with arbitrary shell

Re: [ansible-project] Deploy a Firewall in Ansible

2021-12-22 Thread Stefan Hornburg (Racke)
On 21/12/2021 22:21, Liliana Achig wrote: Excuse me, I'm new to ansible. I don't know if you can help me, how can I check that the port of the firewall that I implemented was blocked or the change was made in the host node, the playbook has already run but I need to know how to do the rest

Re: [ansible-project] Error while copying the file

2021-12-21 Thread Stefan Hornburg (Racke)
On 21/12/2021 11:15, Kumar Rahul wrote: Hello all , I am new to this please help and reply 1. when i was trying to copy one file to other location i am getting ERROR! this task 'copy' has extra params, which is only allowed in the following modules: add_host, win_command, shell,

Re: [ansible-project] Execute an .sql script on mysql with secure installation

2021-12-20 Thread Stefan Hornburg (Racke)
On 20/12/2021 18:42, Tiago Oliveira wrote: oops, wrong code. - name: Create a new .sql file for the table '{{table_name}}'   template:     src: templates/new_table_template     dest: /home/secnet/{{table_name}}.sql - name: Create the new database with name '{{table_name}}'   expect:    

Re: [ansible-project] Execute an .sql script on mysql with secure installation

2021-12-20 Thread Stefan Hornburg (Racke)
On 20/12/2021 18:08, Tiago Oliveira wrote: Hi, I am trying to use an sql script to create a database in mariadb on a openbsd server with ansible. My playbook first create the script with the name of the database to create and then uses expect to give the command "mysql -u root -p < script.sql"

Re: [⚠️] Re: [ansible-project] Facing Issue Ansible Summary

2021-12-20 Thread Stefan Hornburg (Racke)
On 20/12/2021 15:44, 'Jitender J' via Ansible Project wrote: Hi Antony, Thanks for the mail, below is the playbook code snippet ## - hosts: "{{ UI }}"   gather_facts: no   user: ops   tasks:    - name: Check total CPU cores      shell: |        cpu=`sysctl

Re: [ansible-project] Need to Input Host information while run time in Ansible-playbook

2021-12-16 Thread Stefan Hornburg (Racke)
On 16/12/2021 11:31, Joel Justin wrote: Hi Team, Is there any ways to provide mulitple hosts value input while ansible-playbook runitme? I dont wish to provide the host value in static inventory , instead the hosts information should be fetched while runtime.is there any ways to do that.

Re: [ansible-project] How do I correctly pass NULL in set_fact ?

2021-12-15 Thread Stefan Hornburg (Racke)
On 15/12/2021 13:40, Anthony Palermo wrote: I am not able to pass a NULL to community.mysql.mysql_query but I think the issue is independent from the module https://gist.github.com/aworldofcode/35de280946fabcc66e2eea15c8a13dd8 # mariadb sql table includes the following column

Re: [ansible-project] Copy folder from one host to another

2021-12-09 Thread Stefan Hornburg (Racke)
On 10/12/2021 06:12, Lucas Possamai wrote: Hi all, I need to copy the content of a folder from one remote host to another remote host. The copy command needs to be executed as user "postgres". Folder to be copied from source: /data/postgresql/pg_xlog/ Destination: /data/wal_archive/ I tried

Bug#1001381: Multiple instances for WWSympa and SOAP server

2021-12-09 Thread Stefan Hornburg (Racke)
package: sympa version: 6.2.66~dfsg-1 severity: important -- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. OpenPGP_signature Description: OpenPGP digital signature

Re: [ansible-project] Iterate host definitions into single file

2021-12-09 Thread Stefan Hornburg (Racke)
On 09/12/2021 11:36, Chris Jefferies wrote: Racke, One glitch that I did not understand... I must add: host: all instead of just hosts: icinga.example.com ... and run with all hosts defined in the playbook.  I was only using icinga.example.com (the false name of my server).  Now I must

Re: [ansible-project] Iterate host definitions into single file

2021-12-09 Thread Stefan Hornburg (Racke)
On 09/12/2021 10:07, Chris Jefferies wrote: Racke, *ansible_play_hosts* - I did not know about this *magic* variable, as they call it.  I'll test but I assume that the attributes come with it. Then you describe defining a task with: run_once: yes delegate_to: localhost I see run_once in the

Re: [ansible-project] Iterate host definitions into single file

2021-12-09 Thread Stefan Hornburg (Racke)
On 09/12/2021 08:19, Chris Jefferies wrote: I use ansible a lot for work and for my home lab.  I love it. I keep needing an approach that so far has stumped me, so asking here for advice. I want to create a single file (an icinga2_hosts.conf) which has a separate collection of attributes

Re: [ansible-project] Parted plugin fails after first run

2021-12-06 Thread Stefan Hornburg (Racke)
On 06/12/2021 10:50, Lucas Possamai wrote: On Mon, 6 Dec 2021 at 22:21, dulhaver via Ansible Project mailto:ansible-project@googlegroups.com>> wrote: __ I have seen something similar with re-running LVM operations and remember they mentioned to add a *force: yes* option (I don't

Bug#981387: closed by Debian FTP Masters (reply to Stefan Hornburg (Racke) ) (Bug#981387: fixed in pure-ftpd 1.0.50-1)

2021-12-04 Thread Stefan Hornburg (Racke)
On 03/12/2021 19:59, Helmut Grohne wrote: On Fri, Dec 03, 2021 at 07:43:49PM +0100, Stefan Hornburg (Racke) wrote: are you going to create a patch that fixes the problem for good? I don't think that would make sense. Suppose I were to regenerate configure and diff the present configure

Bug#981387: closed by Debian FTP Masters (reply to Stefan Hornburg (Racke) ) (Bug#981387: fixed in pure-ftpd 1.0.50-1)

2021-12-03 Thread Stefan Hornburg (Racke)
On 03/12/2021 19:29, Helmut Grohne wrote: Control: reopen -1 On Wed, Dec 01, 2021 at 09:36:10AM +, Debian Bug Tracking System wrote: It has been closed by Debian FTP Masters (reply to Stefan Hornburg (Racke) ). I think the bug is only partially fixed. While configure.ac has been

Re: [ansible-project] remote copy issue

2021-12-02 Thread Stefan Hornburg (Racke)
On 01/12/2021 18:08, Rene Paquin wrote: I am attemping o copy a file from one remote linux server to two remote linux servers.  My playbook is: - name: copy file   hosts: “remote source server”   gather_facts: false   tasks:     - name: "copy "   copy:     src:

Re: [ansible-project] Encrypt files on remote host

2021-11-29 Thread Stefan Hornburg (Racke)
re that does the encryption. Regards Racke Thanks, Roman On Thu, 25 Nov 2021 at 18:50, Stefan Hornburg (Racke) mailto:ra...@linuxia.de>> wrote: On 25/11/2021 18:22, 'Roman Steinhart' via Ansible Project wrote: > Hi all, > > I want to encrypt a file on a remote

Re: [ansible-project] Encrypt files on remote host

2021-11-25 Thread Stefan Hornburg (Racke)
On 25/11/2021 18:22, 'Roman Steinhart' via Ansible Project wrote: Hi all, I want to encrypt a file on a remote host. I was looking through the existing modules and couldn't find any that is able to do that? My use case is that I want to create a backup (tar file) on a remote host, encrypt

Re: [ansible-project] Calculate partition space used in jinja

2021-11-22 Thread Stefan Hornburg (Racke)
On 22/11/2021 14:19, lift...@gmail.com wrote: My apologies.  I obviously forgot to add the error.  I did find that I was missing a ')' character at the end of the "Total Space" line. But now I get the following: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has

Re: [ansible-project] Re: Non Config Data in Ansible NRM Module

2021-11-22 Thread Stefan Hornburg (Racke)
On 22/11/2021 09:46, Anees fathima Saifudeen wrote: Hi, Could anyone please respond. I have no clue what NRM is about. Regards Racke Thanks in advance, Anees Fathima On Thursday, November 18, 2021 at 8:28:15 PM UTC+5:30 Anees fathima Saifudeen wrote: Hi, Could you please

Re: [ansible-project] How to set hostname with running number

2021-11-22 Thread Stefan Hornburg (Racke)
On 22/11/2021 09:00, dudu.c...@gmail.com wrote: Hi, In my inventory file i have 3 server, I need to set the hostname including prefix1-3 web1 web2 web3 *Inventory fie:* [web] 192.168.0.47 192.168.0.48 192.168.0.49 Add the hostname to the inventory file: web1 ansible_host=192.168.0.47

Re: [ansible-project] how to stop ansible from ignoring syntax errors

2021-11-18 Thread Stefan Hornburg (Racke)
On 18/11/2021 10:29, Axel Rau wrote: Hi all, is there a central knob to stop ansible from continuing after a syntax error? Also, it seems that ansible continues after failed tasks in included roles or included tasks. How can I let ansible stop on all those errors? Hello Axel, can you give

Re: [ansible-project] Can't find error in jinja2 expression

2021-11-16 Thread Stefan Hornburg (Racke)
On 16/11/2021 19:50, Axel Rau wrote: Hi all, in a template, I have: data_directory = '{{ {{ i.data }}/{{ postgresql_version }}/data }}‘ but I’m getting: "AnsibleError: template error while templating string: expected token ':', got ‚}' In the calling ansible block, I have: loop:

Re: [ansible-project] Determining distribution specific facts/paths/etc

2021-11-15 Thread Stefan Hornburg (Racke)
On 15/11/2021 17:43, or...@nwra.com wrote: I've found myself writing a lot of tasks like: - name:"RedHat: Set facts" set_fact:path_lib_security="/usr/lib64/security" when:ansible_os_family == 'RedHat'or ansible_os_family == 'SHMZ' - name:"Debian: Set facts"

Re: [ansible-project] I want to execute nohup command on remote host using ansible but it didn't work

2021-11-15 Thread Stefan Hornburg (Racke)
On 15/11/2021 10:32, dulhaver via Ansible Project wrote: I guess the error message you got would be helpful in order to troubleshoot your problem At any rate, nohup is IMHO not the correct way to start an application as a server / daemon. Even if some tutorials on the web say so. There is

Re: [ansible-project] Unarchive and FreeBSD

2021-11-10 Thread Stefan Hornburg (Racke)
On 10/11/2021 18:32, Norman Gray wrote: Greetings. I recently raised issue , connected to the behaviour of the `unarchive` module on FreeBSD. It was closed as a duplicate and, in effect, not-a-bug, with the indication that any further

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.

Re: [ansible-project] Splunk cluster configuration using ansible playbook

2021-10-27 Thread Stefan Hornburg (Racke)
On 27/10/2021 04:46, Vinod P wrote: Hello All, Have any one tried deploying  Splunk Cluster using ansible playbook. Please share some details. regards Vinod Hello Vinod, it looks like Splunk provides playbooks for Ansible: https://github.com/splunk/splunk-ansible. That might help you.

Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Stefan Hornburg (Racke)
On 22/10/2021 16:09, Raj wrote: Hi, VGM my playbook call roles  ssl scan  ( final part is email to send once)  but it is sending 100 emails Did you ever check the indentation on your task sending email as advised? delegate_to should really work. Regards     Racke --- - hosts: 

Re: [ansible-project] package TASK ... 'should be run under the root user'

2021-10-20 Thread Stefan Hornburg (Racke)
On 20/10/2021 16:45, dulhaver via Ansible Project wrote: On 10/20/2021 4:07 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de>> wrote: On 20/10/2021 15:49, dulhaver via Ansible Project wrote: On 10/20/2021 3:32 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de> <mailto:ra..

Re: [ansible-project] package TASK ... 'should be run under the root user'

2021-10-20 Thread Stefan Hornburg (Racke)
On 20/10/2021 15:49, dulhaver via Ansible Project wrote: On 10/20/2021 3:32 PM Stefan Hornburg (Racke) mailto:ra...@linuxia.de>> wrote: On 20/10/2021 15:26, dulhaver via Ansible Project wrote: > * I have this TASK in a playbook <https://pastebin.com/h83HqMn0 <https://pasteb

Re: [ansible-project] package TASK ... 'should be run under the root user'

2021-10-20 Thread Stefan Hornburg (Racke)
On 20/10/2021 15:26, dulhaver via Ansible Project wrote: * I have this TASK in a playbook which should install a bunch of packages on my (rhel8) target rrequired for postgresql * I am shooting my playbok as a user with root priviledges via sudo Please

Re: [ansible-project] tell 'service' module to continue with playbook, if service isn't found

2021-10-15 Thread Stefan Hornburg (Racke)
On 15/10/2021 16:16, dulhaver via Ansible Project wrote: On 10/15/2021 1:37 PM dulhaver via Ansible Project wrote: On 10/15/2021 1:01 PM Stefan Hornburg (Racke) wrote: On 15/10/2021 12:40, dulhaver via Ansible Project wrote: On 10/15/2021 12:07 PM Stefan Hornburg (Racke) wrote

Re: [ansible-project] tell 'service' module to continue with playbook, if service isn't found

2021-10-15 Thread Stefan Hornburg (Racke)
On 15/10/2021 13:37, dulhaver via Ansible Project wrote: On 10/15/2021 1:01 PM Stefan Hornburg (Racke) wrote: On 15/10/2021 12:40, dulhaver via Ansible Project wrote: On 10/15/2021 12:07 PM Stefan Hornburg (Racke) wrote: On 15/10/2021 12:04, dulhaver via Ansible Project wrote

Re: [ansible-project] tell 'service' module to continue with playbook, if service isn't found

2021-10-15 Thread Stefan Hornburg (Racke)
On 15/10/2021 12:40, dulhaver via Ansible Project wrote: On 10/15/2021 12:07 PM Stefan Hornburg (Racke) wrote: On 15/10/2021 12:04, dulhaver via Ansible Project wrote: On 10/15/2021 11:41 AM Stefan Hornburg (Racke) wrote: On 15/10/2021 11:20, dulhaver via Ansible Project wrote: I

  1   2   3   4   5   6   7   8   9   10   >