Re: [ansible-project] Getting hostnames from a fact

2024-04-24 Thread dulhaver via Ansible Project
1) How can I NOT print what server2 is printing/showing? I'd say add a when clause to the task, like:   - name: Print results     ansible.builtin.debug:       msg: "{{ zero }}"     when: "some condition here" so the print only happens when the condition is met. The condition might be some

Re: [ansible-project] Filter_data manipulation of the debug output .

2023-10-18 Thread dulhaver via Ansible Project
can you provide a bit more context, i.e. where does the variable `stat_out` comes from. Or maybe even better prodvide what debugging the entire variable throws at you debug: var: stat_out in order to see the data structur you are getting > On 10/18/2023 8:02 AM CEST Veera wrote:

Re: [ansible-project] Multipathd is not enabling

2023-10-17 Thread dulhaver via Ansible Project
hi, the syntax of your TASK sems not to match the docs for the service module https://docs.ansible.com/ansible/latest/collections/ansible/builtin/service_module.html#ansible-collections-ansible-builtin-service-module. Would something like ... - name: Enable service httpd, and not touch the

Re: [ansible-project] Welcome to the new Ansible Community Forum!

2023-09-12 Thread dulhaver via Ansible Project
would it i.e. be well received to post links to forum Questions/Topics in here rather then speeling things out in an email? > On 09/12/2023 11:30 AM CEST dulhaver via Ansible Project > wrote: > > > > forum is great. One question ... is there any particular ch

Re: [ansible-project] Welcome to the new Ansible Community Forum!

2023-09-12 Thread dulhaver via Ansible Project
forum is great. One question ... is there any particular change on how to use this mailing list intended by this launch, or will they just co-exist? regards Gunnar > On 09/11/2023 10:42 PM CEST Carol Chen wrote: > > > Hi everyone, > > It’s time! Sign up here

Re: [ansible-project] access particular values gathered with stat

2023-09-07 Thread dulhaver via Ansible Project
023 at 14:34, dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> > wrote: > > > I want to check for existence of a folder and also the right owner, group > > and mode. > > When any of the conditions (exists, owner=postgres, group=postgres, > &

[ansible-project] access particular values gathered with stat

2023-09-06 Thread dulhaver via Ansible Project
I want to check for existence of a folder and also the right owner, group and mode. When any of the conditions (exists, owner=postgres, group=postgres, mode=0755) does not meet requirements I want to stop and be notified of the reason. I think I need stat for that (exists, isdir, gr_name,

Re: [ansible-project] split for data manitpulation

2023-08-29 Thread dulhaver via Ansible Project
> Do split accepts only one square bracket[] parameter? the python aquivalent (something similar to this should be happening in the backgound) would be: >>> myline = 'This line is a test, two, three, four, five, 6, seven' >>> print(myline.split(',')[4], myline.split(',')[5],

Re: [ansible-project] Formatting the output by line by line

2023-08-28 Thread dulhaver via Ansible Project
so, my suggestion was to add stdout_callback = yaml to the [defaults] section of that file and see whether the output suits you better. > On 08/28/2023 1:11 PM CEST Veera wrote: > > > my ansible.cfg is a custom one which I am using from the same location and it > has no more specific

Re: [ansible-project] Formatting the output by line by line

2023-08-28 Thread dulhaver via Ansible Project
no ansible.cfg involved seems impossible to me. ansible --version | grep 'ansible.cfg' (in the location you run the playbook from) should reveal which one is effective. Or am I understanding something badly wrong here? > On 08/28/2023 11:22 AM CEST Veera wrote: > > > Hi , > > Sorry

Re: [ansible-project] Formatting the output by line by line

2023-08-28 Thread dulhaver via Ansible Project
wondering whether stdout_callback: yaml in the ansible.cfg might be doing that > On 08/28/2023 10:56 AM CEST Veera wrote: > > > Hi, > > My play book print the debug output as below > TASK [Print the status of the server] >

Re: [ansible-project] Re: Don't show all ansible output only show msg output on the console

2023-08-21 Thread dulhaver via Ansible Project
On 21.08.23 16:44, Brian Coca wrote: Or just use a custom callback that only outputs debug entries. how would that look like practically? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

Re: [ansible-project] edit string in a multi-line file

2023-07-27 Thread dulhaver via Ansible Project
curious actually how this can be achieved with sophisticated regex and the lineinfile module > On 07/27/2023 4:08 PM CEST dulhaver via Ansible Project > wrote: > > > would this do what you want? > > > - name: edit a line in a file >

Re: [ansible-project] edit string in a multi-line file

2023-07-27 Thread dulhaver via Ansible Project
would this do what you want? - name: edit a line in a file ansible.builtin.command: chdir: /home/username/ cmd: 'sed -i "s/This is a file/This is a new file/" somefile' > On 07/27/2023 3:13 PM CEST Kathy L wrote: > > > I am trying to edit a string in a

Re: [ansible-project] escalation problem with 'copy' TASK

2023-07-27 Thread dulhaver via Ansible Project
nd I'd say that has the same privilege situation as my playbook > On 07/26/2023 6:03 PM CEST Dick Visser wrote: > > > > On Wed, 26 Jul 2023 at 16:53, dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> > wrote: > > > ull 2&g

[ansible-project] escalation problem with 'copy' TASK

2023-07-26 Thread dulhaver via Ansible Project
I have a copy TASK ### - name: copy archive to "{{ postgres_install }}" ansible.builtin.copy: src: "../temp/{{ item }}" dest: "/opt/db/postgres/install/{{ item }}" become:

Re: [ansible-project] inventory works ad-hoc but not for playbooks

2023-07-26 Thread dulhaver via Ansible Project
is better then this [vm-414001-0315] http://vm-414001-0315.step.zrz.dvz.cn-mv.de > On 07/26/2023 11:00 AM CEST dulhaver via Ansible Project > wrote: >

Re: [ansible-project] inventory works ad-hoc but not for playbooks

2023-07-26 Thread dulhaver via Ansible Project
gresversion":"12.12";"targets":"vm-414001-0315"}' > > You have a semi-colon ';' at position 28, that should be a comma. ',' > > On Wed, 26 Jul 2023 at 09:29, dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> >

Re: [ansible-project] inventory works ad-hoc but not for playbooks

2023-07-26 Thread dulhaver via Ansible Project
sorry, the command I am calling this with was not correct (copy'n'paste error): ansible-playbook -i ../temp/vm-414001-0315.ini pg_install.yml -e '{"postgresversion":"12.12";"targets":"vm-414001-0315"}' --list-hosts > On 07/26/2023 10:19 AM

[ansible-project] inventory works ad-hoc but not for playbooks

2023-07-26 Thread dulhaver via Ansible Project
i have an inventory vm-414001-0315.ini that looks like this [vm-414001-0315] vm-414001-0315.step.zrz.dvz.cn-mv.de this works wit ad-hoc commands but throws an error with ansible-playbook #anplay -i

Re: [ansible-project] splitting the output of {{ ansible_play_name }}

2023-07-06 Thread dulhaver via Ansible Project
thanks. I guess that is pretty much the same thing as ... {{ ansible_play_name.split('_')[0] }} ... (which I figured out in the meantime). > On 07/06/2023 9:43 AM CEST Vladimir Botka wrote: > > > On Thu, 6 Jul 2023 09:10:48 +0200 (CEST) > dulhaver via Ansible

[ansible-project] splitting the output of {{ ansible_play_name }}

2023-07-06 Thread dulhaver via Ansible Project
I have a tasks that writes information gathered from remotes to a csv file on localhost - name: write result to output.csv delegate_to: localhost lineinfile: dest: "./temp/{{ ansible_play_name }}.csv" line: >

Re: [ansible-project] checking list of files to see if one exists

2023-07-05 Thread dulhaver via Ansible Project
normally I am at the 'do I feel dumb' side of the conversation. So it's really great whether for once I can help someone else out. > On 07/05/2023 1:35 PM CEST Kathy L wrote: > > > Oh boy, do I feel dumb. I should know that - I was making the problem harder > than it has to be.

Re: [ansible-project] checking list of files to see if one exists

2023-07-05 Thread dulhaver via Ansible Project
3 1:26 PM CEST dulhaver via Ansible Project > wrote: > > > hi, > > you want to delete those files, if they exist, right? > > - name: delete file, if it exists > ansible.builtin.file: > state: absent > path: "/work/{{ item }}&quo

Re: [ansible-project] checking list of files to see if one exists

2023-07-05 Thread dulhaver via Ansible Project
hi, you want to delete those files, if they exist, right? - name: delete file, if it exists ansible.builtin.file: state: absent path: "/work/{{ item }}" loop: - file1 - file2 - file3 - file4 - file5 - file6 - all loop items will be

Re: [ansible-project] loading tasks file based on ansible_fqdn value

2023-07-03 Thread dulhaver via Ansible Project
he expression on the right-hand > > > side "==" should be a string. Instead it's the value of the variable "VM" > > > minus the octal number 0213's missing attribute "step"'s missing > > > attribute "zrz"'s missing attribute &q

Re: [ansible-project] loading tasks file based on ansible_fqdn value

2023-07-03 Thread dulhaver via Ansible Project
t; the octal number 0213's missing attribute "step"'s missing attribute > > "zrz"'s missing attribute "internal". > > > > So, yeah, no wonder that doesn't work. > > > > Try this instead: > > > > when: ansible_fqdn == "V

[ansible-project] loading tasks file based on ansible_fqdn value

2023-07-02 Thread dulhaver via Ansible Project
hi, I want to take different sligthly routes in a playbook based on the particular remote. All remotes are in the same hosts group. I am trying to do this by setting a fact based on the ansible_fqdn value. Based on that fact ('keycloak' in my example here) I am including different tasks

Fwd: Re: [ansible-project] separate logfile per target

2023-07-02 Thread dulhaver via Ansible Project
akasurde staff 40 30 Jun 09:10 localhost > ``` > > On Fri, Jun 30, 2023 at 8:29 AM dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> > wrote: > > > Maybe I am not explaining myself good enough > > * I run a playbook against 30 targets &

Re: [ansible-project] separate logfile per target

2023-06-30 Thread dulhaver via Ansible Project
n you share how that practically is being achieved? putting ... log_path = {{ inventory_hostname }}_ansible.log ... in the ansible.cfg does not work > Vào Th 6, 30 thg 6, 2023 vào lúc 14:54 dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> đã > viết: >

[ansible-project] separate logfile per target

2023-06-30 Thread dulhaver via Ansible Project
we where wondering whether there is a method to generate logfiles per remote target on playbook executions? In other words ... one runs a playbook on 50 targets and gets 50 logfiles (1 per target) out of it. I guess another way to separate things a litte in the logs would be to use serial:

[ansible-project] abstracting loop items (ditcionary)

2023-06-27 Thread dulhaver via Ansible Project
I want to create pg_hba.conf entries with the community.postgresql.postgresql_pg_hba module. I think generally my issue here is not releated to how that module works though I can do this with a TASK like the below ...

RE: [EXTERNAL] [ansible-project] creating a csv for a package existing or not existing on remotes

2023-06-06 Thread dulhaver via Ansible Project
stalled > > debug: > > msg: 'Hey package is installed' > > when: "''MyPackage'' in ansible_facts.packages" > > > > > > -Original Message- > From: dulhaver via Ansible Project > Sent: Tuesday, June 6, 2023 10:18 AM

[ansible-project] creating a csv for a package existing or not existing on remotes

2023-06-06 Thread dulhaver via Ansible Project
I want to check whether a certain package is installed on a coupld of servers and create a csv-file from it sub1-rd1533.agrar.portal.local, python3-psycopg2 is missing sub1-rd5194.prod.eakte.rz-abc.local, python3-psycopg2 exists vm-414001-0251.step.zrz.abc.local, python3-psycopg2 exists

Re: [ansible-project] check connectivity (telnet

2023-06-05 Thread dulhaver via Ansible Project
ote: > > > On Mon, 5 Jun 2023 11:53:44 +0200 (CEST) > dulhaver via Ansible Project wrote: > > > probably I did not make myself clear enough > > No. Your statement can't be clearer: "to check whether postgres1 has > a connection via port 5432 to a specific IP

[ansible-project] get_url ... donlwoading html, nt raw content

2023-06-05 Thread dulhaver via Ansible Project
I want to download a .j2 file from a local bitbucket repository to a local folder. == - name: download artifacts - fetch template from repo delegate_to: localhost ansible.builtin.get_url: url:

Re: [ansible-project] check connectivity (telnet

2023-06-05 Thread dulhaver via Ansible Project
actually, just gathering information) was the other way around ... ... whether 'postgres1' would be ready to accept connections from :5432 > On 06/04/2023 1:38 PM CEST Vladimir Botka wrote: > > > On Sun, 4 Jun 2023 12:06:39 +0200 (CEST) > dulhaver via Ansible Project wrote:

[ansible-project] check connectivity (telnet

2023-06-04 Thread dulhaver via Ansible Project
hi, I am running a playbook og a couple of postgres-remotes who play different roles in a complex server landscape. Now I want to check to check whether i.e. postgres1 has a connection via port 5432 to a specific IP address. The true/false like result of such a check should be saved into a

Re: [ansible-project] opposite of --limit (to exclude hosts)

2023-04-27 Thread dulhaver via Ansible Project
thanks I can make it work with inline --limit '!specific_server' but could not figure out the right syntax for adresseing a list 'ansible all --limit "@limit.file" -m ping' is waht I am doing tried several ways for adding the '!' to the above but could not make it work yet > On

[ansible-project] opposite of --limit (to exclude hosts)

2023-04-27 Thread dulhaver via Ansible Project
ist there anything like a negation of --limit (to not execute a playbook on the named remotes) ? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] include_vars or vars_files in a role

2023-04-24 Thread dulhaver via Ansible Project
the role structure can be as complex as mentioned in the previous post, but it does not have to include everything. In your case I'd say it boild down to this. you create a structure like this: base_folder | |__ playbook.yml | |__ /roles | |__

Fwd: Re: [ansible-project] Need to automate task via bastion host

2023-04-04 Thread dulhaver via Ansible Project
@gmail.com> wrote: > > > > > > Hi Todd, > > > > Thank you for explaining the same, however I am still getting the same > > error-: > > > > > > > > On Mon, Apr 3, 2023 at 11:13 AM dulhaver via Ansible Project > > mail

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread dulhaver via Ansible Project
I agree with Tood, that setting up a propper ~/.ssh/config should be the way to do this. something like ... Host jumphost HostName jumphost.blub.com User username PreferredAuthentication publickey IdentityFile ~/.ssh/demo.ed25519 Host internal-target

Re: [ansible-project] dynamic variable content

2023-03-23 Thread dulhaver via Ansible Project
ansible vars file. That will not work. > Take a look at > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/strftime_filter.html > > > On Thu, 23 Mar 2023 at 10:58, dulhaver via Ansible Project > wrote: > > > > I am trying to define a variable

[ansible-project] dynamic variable content

2023-03-23 Thread dulhaver via Ansible Project
I am trying to define a variable in defaults.yml with some kind of dynamic. Conrete creating a directory with the current timestamp at the end of the name. data_dir: /file/to/dir_$(date +%F_%H%M%S) gives me exactly the directory name 'dir_$(date +%F_%H%M%S)' and not dir_2023_03_23_115122.

Re: [ansible-project] read password from a variable

2023-03-09 Thread dulhaver via Ansible Project
I am not sure, but am wondering whether maybe the remote host needs to be able to import the required Python library (pexpect) for this to work ... can that be it? > On 03/09/2023 6:58 PM CET Veera wrote: > > > While sourcing a profile file , I have to enter a password in my play. >

Re: [ansible-project] template - line break of bash script is skipped

2023-01-30 Thread dulhaver via Ansible Project
es to expand in that line, you could rewrite > > ${#ARCHIVE_LOGS[@]} > > as > > ${{ '{#' }}ARCHIVE_LOGS[@]} > > > > On 1/30/23 5:45 AM, dulhaver via Ansible Project wrote: > > > > > I am using the template module for a bash script > > >

[ansible-project] template - line break of bash script is skipped

2023-01-30 Thread dulhaver via Ansible Project
I am using the template module for a bash script There is a problem with these lines cd $PGARCH {% raw %}while mapfile -t -n 20 ARCHIVE_LOGS && ((${#ARCHIVE_LOGS[@]})){% endraw %} do they should be like below cd $PGARCH while mapfile -t -n 20 ARCHIVE_LOGS &&

Re: [ansible-project] at - specific time & date

2022-12-13 Thread dulhaver via Ansible Project
> Yes, it's worth PR. I'll write tests for this. The question is which > collection? honestly, I am still not really 100% sure what the term 'collection' actually means in the Ansible context and how things are organized. The issue, however, lives in ansible-collection/ansible.posix. Isn't

Re: [ansible-project] at - specific time & date

2022-12-13 Thread dulhaver via Ansible Project
ems to be a different approach then the one suggested in the PR though (I can not judge on any of that due to missing python skills). > On 12/13/2022 11:03 AM CET Vladimir Botka wrote: > > > On Tue, 13 Dec 2022 09:23:40 +0100 (CET) > dulhaver via Ansible Project wrote:

Re: [ansible-project] at - specific time & date

2022-12-13 Thread dulhaver via Ansible Project
PM CET Vladimir Botka wrote: > > > On Mon, 12 Dec 2022 15:30:07 +0100 (CET) > dulhaver via Ansible Project wrote: > > > I want to automate a list of command exections with at. > > What is the concepts here to specify something like '16:00 2023-01-19'? > >

[ansible-project] at - specific time & date

2022-12-12 Thread dulhaver via Ansible Project
I want to automate a list of command exections with at. Looking at the at modules documentation I see only unit & count for specify the time and date. That looks a litte unprecise to me. What is the concepts here to specify something like '16:00 2023-01-19'? -- You received this message

Re: Re: [ansible-project] now space left on remote_tmp

2022-11-13 Thread dulhaver via Ansible Project
into the wrong direction. > On 11/11/2022 7:41 PM CET Dick Visser wrote: > > > > > On Fri, 11 Nov 2022 at 17:35, dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> > wrote: > > > here in plain text > > > > I am g

Fwd: Re: [ansible-project] now space left on remote_tmp

2022-11-11 Thread dulhaver via Ansible Project
here in plain text I am getting fatal: [VM-414001-0264.step.zrz.dvz.cn-mv.de]: FAILED! => msg: 'failure writing module data to temporary file for transfer: [Errno 28] No space left on device on "Gathering Facts" of a playbook execution, eventhough I have setup ansible to use

[ansible-project] now space left on remote_tmp

2022-11-11 Thread dulhaver via Ansible Project
I am getting 12fatal: [VM-414001-0264.step.zrz.dvz.cn-mv.de]: FAILED! => msg: 'failure writing module data to temporary file for transfer: [Errno 28] No space left on device eventhough 123user@vm-51150-0128:~/repos/ansible/step> grep tmp ansible.cfg

Re: [ansible-project] force file creation with template module

2022-11-10 Thread dulhaver via Ansible Project
e, Division Chief > Infrastructure Services, OISM > Mobile: 202.355.4123 > > > On Nov 10, 2022, at 8:41 AM, dulhaver via Ansible Project > > wrote: > > > > I need to repair some templated files from a previous playbook execution > > > > # this is

[ansible-project] force file creation with template module

2022-11-10 Thread dulhaver via Ansible Project
I need to repair some templated files from a previous playbook execution # this is a test # - name: my template TEST - template postgres.conf vars: - pg_service_name: "{{ item }}" ansible.builtin.template: src:

[ansible-project] creating a csv file on localhost with lineinfile

2022-11-07 Thread dulhaver via Ansible Project
I want to create a csv with 3 values per host the FQDN of the host, a string "postgres" and the stdout of a vairable I have defined here is my playbook which I am testing againt 3 hosts which all have running postgres, so I expect/aim at 3 lines

[ansible-project] create a file based on grep result

2022-10-21 Thread dulhaver via Ansible Project
I want to create a file based on a grep result of another file on the host It can be achieved with a shell TASK I believe ...   - name: create 10-ssl.conf based on old postgresql.conf     ansible.builtin.shell:   cmd: grep ssh /var/lib/pgsql/13/data/postgresql.conf >

[ansible-project] variable precedence

2022-10-13 Thread dulhaver via Ansible Project
Working with roles I am trying to understand variable precedence a little better bases on this list from the manual https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#understanding-variable-precedence. on line 14 we have play vars_files. That means an entriy like

[ansible-project] best practice temporary files

2022-10-07 Thread dulhaver via Ansible Project
we have trouble at times to access a git repository with config files directly from an ansible host. As workaround we get_url the file to the ansible controler (delegate_to: localhost) and then copy it to the remote target in a second TASK. There has been some hassle with git tracking those

[ansible-project] creating a postgres user - non default postgres port

2022-09-26 Thread dulhaver via Ansible Project
I am trying to create a postgres user/role with community.postgresql.postgresql_user. The instance I am trying to address runs on port 5436 so my TASK looks like - name: create db admin user

Re: [ansible-project] create variable from value gathered on remote

2022-09-20 Thread dulhaver via Ansible Project
## I use "{{ pg_service_port.stdout }}" later on for defining the port# of the new postgres service thks everybody for the input. I learned a lot, even though I do not use everything ini this particular case yet. > On 09/19/2022 5:34 PM CEST dulhaver via An

Re: [ansible-project] create variable from value gathered on remote

2022-09-19 Thread dulhaver via Ansible Project
> On 09/19/2022 4:25 PM CEST Todd Lewis wrote: > > do this: > >loop: "{{ found_files.files | map(attribute='path') | map('basename') | > list }}" great, that works. So one part of the puzzle is solved, thx -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] create variable from value gathered on remote

2022-09-19 Thread dulhaver via Ansible Project
act: env_files: "{{ found_files.files | map(attribute='path') }}" - name: fetch all .env files into a "fetched" folder on Ansible machine ansible.builtin.fetch: src: "/opt/db/postgres/bin/{{ item }}" dest: fetched/ flat: true become: yes loop: -

Re: [ansible-project] create variable from value gathered on remote

2022-09-19 Thread dulhaver via Ansible Project
Thanks Vladimir ... that looks pretty sophisticated (almost out of sight-ish) ... but could be a nice challenge to even understand what is going on :-) so far I detected one challenge. Maybe my initial question has not been sufficientely explicit with this. I run this against a single host

[ansible-project] create variable from value gathered on remote

2022-09-16 Thread dulhaver via Ansible Project
I am trying to automate the creation of postgresql services on a shared postgres Server as my target. we create an .env file for each service on the target with contains the portnumber used for that particular instance. Based on that I detect the largest currently reserved postgres port. I

Re: [ansible-project] template "Missing end of comment tag"

2022-09-15 Thread dulhaver via Ansible Project
sorry false alarm. my backup_archivelogs.sh file was completely off > On 09/14/2022 4:03 PM CEST dulhaver via Ansible Project > wrote: > > > I am trying to use template module to send 2 shell scripts to a remote.

[ansible-project] template "Missing end of comment tag"

2022-09-14 Thread dulhaver via Ansible Project
I am trying to use template module to send 2 shell scripts to a remote. ### TASK ## - name: configure postgres - template backup scripts ansible.builtin.template: src: "{{ item }}.j2"

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-02 Thread dulhaver via Ansible Project
it has turned out that our entire approach creating the postgres service needs to be different and that the different approach provides an editable .env file. So this was kind of a false alarm, sorry > On 09/02/2022 7:17 AM CEST dulhaver via Ansible Project > wrote: > >

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread dulhaver via Ansible Project
ter Rowe, Division Chief > Infrastructure Services, OISM > Mobile: 202.355.4123 > > > > On Sep 1, 2022, at 1:15 AM, dulhaver via Ansible Project > > mailto:ansible-project@googlegroups.com> > > wrote: > > > > I need to create a postgresql@[db_service_name

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread dulhaver via Ansible Project
> > > > > --- > > > > ansible_become_password: "my sudo password" > > > > > > > > If you use Ansible Tower you can provide the vault secret in an Ansible > > Vault Credential type. We use this method also for storing privil

[ansible-project] create a systemd service without write access to /etc/systemd/system

2022-08-31 Thread dulhaver via Ansible Project
I need to create a postgresql@[db_service_name].service for systemd on remote hosts. Based on extremely limited access rights on such hosts (due to strict company security policies) the challenge I am facing is that the only way to do this manually is via sudo systemctl edit --full

[ansible-project] 'include_vars' doesn't find the vars file

2022-08-05 Thread dulhaver via Ansible Project
I want to include a defaults, or variable file in the /defaults/main.yml of a role I am playing Upon execution I am getting "the defaults/main.yml file for role 'postgres_disable' must contain a dictionary of variables" == DETAILED ERROR

Re: [ansible-project] rsync failure

2022-08-01 Thread dulhaver via Ansible Project
> On 08/01/2022 9:04 AM CEST Ashok Reddy wrote: > > > --- > - hosts: all > become: true > become_method: sudo > gather_facts: true > tasks: > - name: rsync > ansible.posix.synchronize: > src: /root > dest: /root > delegate_to: hostname > > > error: > > > TASK [rsync] >

[ansible-project] to which local bash command does get_url translate to?

2022-07-29 Thread dulhaver via Ansible Project
I am running ansible playbooks against hosts in different networks or firewall-zones and need to fetch confg-files from a local BitBucket server at times with get_url TASKS. connectivoty to that BitBucket Server is challenging, to put it nicely. In order to troubleshoot how to make this work

Re: [ansible-project] renaming a folder on the remote ... issue with defaults/main.yml

2022-07-29 Thread dulhaver via Ansible Project
> On 07/29/2022 12:24 PM CEST Dick Visser wrote: > > > On Fri, 29 Jul 2022 at 12:02, dulhaver via Ansible Project > wrote: > > > it seems neither > > > > > > - name:

Re: [ansible-project] renaming a folder on the remote ... issue with defaults/main.yml

2022-07-29 Thread dulhaver via Ansible Project
> On 07/29/2022 11:24 AM CEST Dick Visser wrote: > > > On Fri, 29 Jul 2022 at 11:09, dulhaver via Ansible Project > wrote: > > > "mv: cannot stat '{'\\''changed'\\'': False, '\\''stat'\\'': > > {'\\''exists'\\'': True, '\\''path'\\'':

[ansible-project] renaming a folder on the remote ... issue with defaults/main.yml

2022-07-29 Thread dulhaver via Ansible Project
I am trying to rename a folder on a remote if it exists. this is being done via a role. == my two tasks === - name: move legacy postgres - stat postgres_data stat: path="{{ postgres_data }}" register: postgres_data - name:

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

2022-07-27 Thread dulhaver via Ansible Project
> 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 look like a

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

2022-07-27 Thread dulhaver via Ansible Project
I am trying to rename/move a folder on a remote host and try to do this based on whether it exists 2 TASKS should be doing this - name: move legacy postgres - stat postgres_base stat: path=/opt/db/postgres

Re: [ansible-project] display information returned with debug in a more usable layout

2022-07-20 Thread dulhaver via Ansible Project
thnks, that worked (of course). I try not to be embarrased too much for having someone spelling this outfor me like this :-). Hopefully I'll be able to pay back to this list later down the road. I see there is a lot to learn and understand yet (in this case "use of variables" for example).

Re: [ansible-project] display information returned with debug in a more usable layout

2022-07-20 Thread dulhaver via Ansible Project
qn": "", "ansible_distribution": "RedHat", "ansible_distribution_release": "Ootpa", "ansible_distribution_version": "8.6", "ansible_distribution_major_version": "8", "ansible_distribution_file_path&

[ansible-project] display information returned with debug in a more usable layout

2022-07-18 Thread dulhaver via Ansible Project
I am trying to retreive information about installed versions of a package on a couple of hosts. - name: check pgBackRest version command: /usr/bin/pgbackrest version register: backrest_version - name: Print return information from the previous task ansible.builtin.debug: var:

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

2022-07-18 Thread dulhaver via Ansible Project
CEST Dick Visser wrote: > > > Hi > > On Fri, 15 Jul 2022 at 13:07, dulhaver via Ansible Project > wrote: > > > sorry, you are right I did not provide the -vvv output. I tested this once > > again though and it showed that the copying > > > > > &

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

2022-07-15 Thread dulhaver via Ansible Project
hi, > On 07/15/2022 11:44 AM CEST Dick Visser wrote: > On Fri, 15 Jul 2022 at 11:18, dulhaver via Ansible Project > mailto:ansible-project@googlegroups.com> > wrote: > > > changing > > > > dest: " {{ item }} " to > > dest: "{{ it

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

2022-07-15 Thread dulhaver via Ansible Project
> On 07/14/2022 6:00 PM CEST Todd Lewis wrote: > > Remove the bogus leading and trailing spaces from `dest:`. > spot on! thx. changing dest: " {{ item }} " to dest: "{{ item }}" solves the issue. It's unexpected though that such a mistake does not produce any kind of error

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

2022-07-14 Thread dulhaver via Ansible Project
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 pushed to the remote.

Re: [ansible-project] file does not do what it should - inside a role

2022-07-14 Thread dulhaver via Ansible Project
like so often :-), the problem went away by running the playbook several times now. Sorry for the false alarm > On 07/14/2022 9:11 AM CEST dulhaver via Ansible Project > wrote: > > > sorry, I just noted the indentation got messed up. The TASKS in question loo

Re: [ansible-project] file does not do what it should - inside a role

2022-07-14 Thread dulhaver via Ansible Project
krest become: true loop: - /var/lib/pgbackrest # sudo mkdir -p /var/lib/pgbackrest# ERROR: not being created !!! === > On 07/13/2022 3:08 PM CEST dulhaver via Ansible Project >

[ansible-project] file does not do what it should - inside a role

2022-07-13 Thread dulhaver via Ansible Project
I have a ./roles/pgBackRest_install/tasks/main.yml aiming to install pgBackRest. the entire roles goes through without any problem but these 2 TASKS are practially not havin any effect on the target. neiter /etc/pgbackrest/pgbackrest.conf, nor /var/lib/pgbackrest are being created (eventhough

[ansible-project] docker_container - container stops without completing the commands

2022-07-11 Thread dulhaver via Ansible Project
I want to create a docker container on a remote host and then, in a second step build a binary for pgBackRest inside that container. It fails with the task to create the container, install some packages for the build and then remain to run. - name: creating a build-container

Re: [ansible-project] manage docker via Ansible - question on the python docker library/package on the target

2022-07-07 Thread dulhaver via Ansible Project
> The best alternative is usually to install it from system packages. For > example, on Ubuntu and Debian, there's the python3-docker system > package you can install. For other OSes similar packages might exist. same same (python3-docker) on this rhel8 host. Will go for that then. thx for the

[ansible-project] manage docker via Ansible - question on the python docker library/package on the target

2022-07-07 Thread dulhaver via Ansible Project
hi everybody, I try to handle docker containers via Ansible and am getting this error: msg: 'Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on vm-51150-0191''s Python /usr/libexec/platform-python. Please read

Re: [ansible-project] Can we run roles in parallel for multiple hosts?

2022-06-27 Thread dulhaver via Ansible Project
wondering about the 'why' of your question I I guess it is about speeding up execution? There is an extension mitogen4ansible which claims to speed up playbook execution significantly. If I understand that correctly it is related to parallelizing

Re: [ansible-project] Ansible galaxy Role

2022-06-18 Thread dulhaver via Ansible Project
I agree, there is no question here really. unless your question is ... "please give me the playbook". Not sure whether such a request meets the nature of such a mailing list really though. On 18.06.22 17:21, Rock wrote: the question is mentioned above !! ( regarding ansible galaxy roles: i

Re: [ansible-project] interprete_python error..

2022-06-17 Thread dulhaver via Ansible Project
I am pretty new to Ansible myself, but based on the error message the first thing I would try was checking whether a package python-setuptools was installed on the 172.16.13.160 host. On 17.06.22 07:55, 'Shivakumar Venkataswamy' via Ansible Project wrote: Hi team, I'm traying to install

Re: [ansible-project] multiple loops in single TASK

2022-05-24 Thread dulhaver via Ansible Project
On 24.05.22 03:08, Dick Visser wrote: This is not possible. ok, thx Also, why would you want to 'nest' the packages? good point, maybe that's just me trying to abstract things over the top On Mon, 23 May 2022 at 18:43, dulhaver via Ansible Project wrote: I want to to install

[ansible-project] multiple loops in single TASK

2022-05-23 Thread dulhaver via Ansible Project
I want to to install some packages to several almalinux hosts -name:"docker=install" delegate_to:"{{ item }}" dnf: name: -'https://download.docker.com/linux/rhel/8/source/stable/Packages/docker-ce-20.10.15-3.el8.src.rpm' -yum-utils -device-mapper-persistent-data -lvm2 state:present loop:

Re: [ansible-project] playbook to comment out one line and add another line in a file

2022-05-06 Thread dulhaver via Ansible Project
On 06.05.22 14:52, Tony Wong wrote: is there docker module or I should just use shell module? I believe it's always better to use designated Modules over shell or command that said ... you may want to get familiar (or at least be aware of this list

  1   2   >