Re: [ansible-project][RESOLVED] ansible.builtin.service hangs

2022-10-15 Thread Axel Rau
stop for some reason. > > On Thu, Oct 13, 2022 at 12:24 PM Axel Rau <mailto:axel@chaos1.de>> wrote: > Applying your patch does not solve my problem. It still hangs. )-( > >> Am 13.10.2022 um 12:37 schrieb Todd Lewis > <mailto:uto...@gmail.com>>: >>

Re: [ansible-project] ansible.builtin.service hangs

2022-10-13 Thread Axel Rau
Applying your patch does not solve my problem. It still hangs. )-( > Am 13.10.2022 um 12:37 schrieb Todd Lewis : > > Your last "when:" is wrong. > > when: 'not i_am_master' > > A quoted when condition that contains no jinja mustaches is just a string, > which is always true. You want > >

[ansible-project] ansible.builtin.service hangs

2022-10-13 Thread Axel Rau
The last task below does not complete. - - - - name: Enable/Disable servers ansible.builtin.service: name: '{{ ena_item }}' enabled: '{{ i_am_master }}' loop_control: loop_var: ena_item loop: - mailman - uwsgi - nginx - name: Start uwsgi if i_am_master

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

2022-10-13 Thread Axel Rau
Looks good. Will try it! Thanks, Axel > Am 13.10.2022 um 09:51 schrieb 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 >> - - - &

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

2022-10-12 Thread Axel Rau
If I install sudo, this seems to work: - - - shell: sudo -u {{ sk_user }} ssh {{ ssh_peer }} date - - - Axel > Am 12.10.2022 um 19:48 schrieb Axel Rau : > > OS is FreeBSD. > > A. > >> Am 12.10.2022 um 19:31 schrieb Axel Rau > <mailto:axel@chaos1.de>>

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

2022-10-12 Thread Axel Rau
OS is FreeBSD. A. > Am 12.10.2022 um 19:31 schrieb Axel Rau : > > Hi all, > > This stopped working after some upgrade of ansible: > > - - - > - name: Test new ssh connection >command: "su {{ sk_user }} -c 'ssh {{ ssh_peer }} date‘“ > - - - > >

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

2022-10-12 Thread Axel Rau
Hi all, This stopped working after some upgrade of ansible: - - - - name: Test new ssh connection command: "su {{ sk_user }} -c 'ssh {{ ssh_peer }} date‘“ - - - It just hungs in the shell. How can this be done in 2.13.1? Any help appreciated, Axel --- PGP-Key: CDE74120 ☀ computing @

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

2022-01-27 Thread Axel Rau
> Am 26.01.2022 um 19:52 schrieb Stefan Hornburg (Racke) >: > > So what's the problem with that? None. (-; My mistake. Thanks, Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius -- You received this message because you are subscribed to the Google Groups

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

2022-01-26 Thread Axel Rau
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 }}' Any help welcome, Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project][RESOLVED] fancy index error in community.general.nsupdate

2021-12-13 Thread Axel Rau
> Am 13.12.2021 um 13:29 schrieb Todd Lewis : > > > Those default(None) should probably be default(omit). > >> Is this a bug in the nsupdate module? > > I expect it is, or at least it could be handled better. But my guess is it’s > being triggered by your use of None instead of omit. >

[ansible-project] fancy index error in community.general.nsupdate

2021-12-12 Thread Axel Rau
After fixing the argument issue, I’m stuck with this: I have a role lr_nsupdate so: - - - - name: Show calling args debug: var: ca - name: Update DNS master server community.general.nsupdate: key_name: '{{ key_name }}' key_algorithm: '{{ algorithm }}' key_secret: '{{ secret

Re: [ansible-project][RESOLVED] Unknown error with arguments of roles

2021-12-12 Thread Axel Rau
> Am 12.12.2021 um 13:58 schrieb Jorge Rúa : > > You either change it to ca.ca.owner_name or remove the second 'ca' for each > dict member. Naturally of course, (-; Thanks, Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius -- You received this message because you are subscribed to

[ansible-project] Unknown error with arguments of roles

2021-12-12 Thread Axel Rau
Hi all, I have a role lr_nsupdate so: - - - - name: Show calling args debug: var: ca - name: Update DNS master server community.general.nsupdate: key_name: '{{ key_name }}' key_algorithm: '{{ algorithm }}' key_secret: '{{ secret }}' server: '{{ server }}' zone: '{{

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

2021-11-18 Thread Axel Rau
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? Thanks, Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius

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

2021-11-17 Thread Axel Rau
> Am 16.11.2021 um 20:32 schrieb Stefan Hornburg (Racke) : > > you certainly can't nest the curly braces. Oh yes, you are right. (-: Thanks, Axel --- PGP-Key: CDE74120 ☀ computing @ chaos claudius -- You received this message because you are subscribed to the Google Groups "Ansible

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

2021-11-16 Thread Axel Rau
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: - '{{ i.data }}/{{

Re: [ansible-project] BUG: "unable to convert str to int" but 'str' is int ?

2021-02-06 Thread Axel Rau
> Am 05.02.2021 um 21:12 schrieb 'Felix Fontein' via Ansible Project > : > > > So you have to write > > option: '{{ templated expression }}‘ Yes, I did this, but with double quotes, which failed. So everything runs as expected. Thanks for your patience, Axel --- PGP-Key: CDE74120 ☀

Re: [ansible-project] BUG: "unable to convert str to int" but 'str' is int ?

2021-02-05 Thread Axel Rau
Hi, thanks for answering, but: > Am 05.02.2021 um 17:36 schrieb 'Felix Fontein' via Ansible Project > : > > you are not templating the parameters, How and where should I template the parameters? I tried things like ca.ttl | int in the lr_nsupdate role, with no luck. My use case is

[ansible-project] BUG: "unable to convert str to int" but 'str' is int ?

2021-02-05 Thread Axel Rau
Hi all, this role: - - - - name: Show calling args debug: var: ca - name: Update DNS master server community.general.nsupdate: key_name: "{{ key_name }}" key_algorithm: "{{ algorithm }}" key_secret: "{{ secret }}" server: "{{ server }}" zone: ca.zone record:

Re: [ansible-project] How are group_vars merged?

2021-01-08 Thread Axel Rau
Hi, > Am 07.01.2021 um 20:58 schrieb Jean-Yves LENHOF : > > Perhaps here is what you're looking for… I have variable ns defined only in inventory/group_vars/ns.yaml, but it is not used at all. So something must be wrong with my inventory. Is ns5 not in group ns? Or is something wrong with

[ansible-project] How are group_vars merged?

2021-01-07 Thread Axel Rau
Hi all, I try to understand how group_vars are merged: >From my inventory/hosts: all: children: ... dmz5_jails: hosts: ... ns5: ... ... dmz5_hosts: children: ... dmz5_jails: all_jails: children: ...

[RESOLVED] Re: [ansible-project] calling handler if package has been updated

2021-01-07 Thread Axel Rau
Hello Racke, > Am 07.01.2021 um 14:18 schrieb Stefan Hornburg (Racke) : > > as far as I know "notify" is a generic task parameter and not related to the > module you are using. Ah, yes, as task parameter, it works: - name: Install packages, needed for named pkgng: name: "{{ lr_bind9_pkg

[ansible-project] calling handler if package has been updated

2021-01-07 Thread Axel Rau
Hi, in a role, I have: - name: Install packages, needed for named pkgng: name: "{{ lr_bind9_pkg }}" state: latest register: testresult I want to trigger a reload of named, if pkgng has changed something. As pkgng does not have a notify attribute, I tried: - name schedule reload

Re: [ansible-project] Mapping from hosts to services

2020-12-16 Thread Axel Rau
> Am 16.12.2020 um 12:09 schrieb Stefan Hornburg (Racke) : > > You can certainly use roles dynamically from the playbook. Get rid of the > unflexible roles: > statement in your playbook and use tasks: > > - hosts: chaosjails > tasks: >- include_role: >name: "{{ myjail_role }}" >

Re: [ansible-project] Mapping from hosts to services

2020-12-16 Thread Axel Rau
> Am 15.12.2020 um 14:02 schrieb Axel Rau : > > How can I enhance my inventory to map this role to a jail on a specific host ? > Or more general, to map services to jails? AFAIK playbooks and roles can’t be selected from variables or per conditionals. Their calling statements are

[ansible-project] Mapping from hosts to services

2020-12-15 Thread Axel Rau
Hi all, I’m still in the learning phase. I try to complete a strong normalized approach with all variables and dependencies declared in the inventory with the goal to manage the configuration of a server infrastructure. Currently, my ansible setup configures and populates FreeBSD hosts and