[ansible-project] ansible-rulebook questions

2024-06-03 Thread Dimitri Yioulos
Recently, I installed ansible-rulebook via Python pip, as per instructions here - https://ansible.readthedocs.io/projects/rulebook/en/stable/installation.html. Additionally, I installed the EDA collection, as per instructions here - https://github.com/ansible/event-driven-ansible. Before I ask

[ansible-project] Re: Debug output as copy source

2024-05-28 Thread Dimitri Yioulos
ound* > > Those files do exist. > > On Tuesday, May 28, 2024 at 11:34:03 AM UTC-4 Dimitri Yioulos wrote: > >> Hi, all. >> >> I want to use the output of debug as the source to then create backups of

[ansible-project] Re: Debug output as copy source

2024-05-28 Thread Dimitri Yioulos
tal: [bed-test-9-dy5]: FAILED! => changed=false msg: |-Source /root/.ssh/known_hosts/home/ user1/.ssh/known_hosts/home/user2/.ssh/known_hosts /home/user3/.ssh/known_hosts not found* Those files do exist. On Tuesday, May 28, 2024 at 11:34:03 AM UTC-4 Dimitri Yioulos wrote: >

[ansible-project] Debug output as copy source

2024-05-28 Thread Dimitri Yioulos
Hi, all. I want to use the output of debug as the source to then create backups of that source (eek, I understand that; hope everyone else does). Here's the playbook relevant parts: *---* *- hosts: host1,host2 #- hosts:

Re: [ansible-project] Looping through a register variable

2024-05-23 Thread Dimitri Yioulos
' > > passes the whole list as a single item. So you need to not put the list in > a list: > > loop: '{{ known.stdout_lines }}' > > should do the trick. > — > Todd > > > On 5/23/24 11:17 AM, Dimitri Yioulos wrote: > > Todd, I made the change, but, the las

Re: [ansible-project] Looping through a register variable

2024-05-23 Thread Dimitri Yioulos
ved. The latter is a possibly very long string with the > complete output stream intact. > > - name: Append to all known_host files > shell: cat /tmp/append >> {{ item }} > loop: > - '{{ known.stdout_lines }}' > > > On 5/23/24 9:07 AM, Dimitri Yioulos

[ansible-project] Looping through a register variable

2024-05-23 Thread Dimitri Yioulos
Good day, all. I hope I'm not wearing out my welcome with too many questions. In the following playbook, I first find any know_host file for any user on a particular system. I then copy a file with the list of additions to add to the known_hosts files. What I want to do is use the output of my

Re: [ansible-project] Use of register variable in following play(s)

2024-05-21 Thread Dimitri Yioulos
- name: Change known_host file > ansible.builtin.script: > cmd: foo.sh "{{ item }}" > loop: "{{ found.files|map(attribute='path') }}" > > > > foo.sh is a script on your controller, adjacent to your playbook. > > > On Tue, 21 May 20

[ansible-project] Use of register variable in following play(s)

2024-05-21 Thread Dimitri Yioulos
Good day. I need to make changes in the know_hosts files of users on various hosts. I'll use a script to do the actual changes in known_hosts. I have the following simple playbook, so far. It identifies users with known_host files: * hosts: all gather_facts: false become:

Re: [ansible-project] Create a variable based on a variable

2024-05-17 Thread Dimitri Yioulos
pensive) is to create an initial > task that queries the each vcenter / datacenter pair and creates this > dictionary in real time. > > Walter > -- > Walter Rowe, Division Chief > Infrastructure Services Division > Mobile: 202.355.4123 <(202)%20355-4123> > &

Re: [ansible-project] Create a variable based on a variable

2024-05-17 Thread Dimitri Yioulos
ively (and more expensive) is to create an initial > task that queries the each vcenter / datacenter pair and creates this > dictionary in real time. > > Walter > -- > Walter Rowe, Division Chief > Infrastructure Services Division > Mobile: 202.355.4123 <(202)

[ansible-project] Create a variable based on a variable

2024-05-08 Thread Dimitri Yioulos
Hello, all. The subject of this post is probably terribly named. That said, here's what I'm trying to accomplish: I have two VMware vCenter hosts - vcenter1.mycompany.com and vcenter2.mycompany.com. Within each host is are two datacenters - datacenter1 and datacenter2. for each host, the

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
history - was the > *first* command in the history which included "disablerepo". Inserting tac > in the pipeline reverses the order so your grep will match on the last > occurrence. > > Cheers, > -- > Todd > > > On 3/21/24 10:00 AM, Dimitri Yioulos wrote: > &g

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
build a pipeline with an uninitialized history - was the > *first* command in the history which included "disablerepo". Inserting tac > in the pipeline reverses the order so your grep will match on the last > occurrence. > > Cheers, > -- > Todd > > > On 3/21/24 10:0

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
I should have mentioned that this is the expected output, for example: *[dyioulos@myhost ~]$ history | grep -m 1 disablerepo 87 dnf install --disablerepo=somerepo https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm* On Thursday, March 21, 2024 at 2:01:28 PM UTC-4 Dimitri

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
Playbook: * hosts: all gather_facts: false become: yes become_user: root become_method: sudo tasks:- name: Get last yum update which includes "disablerepo" shell: 'history | grep -m 1 disablerepo' failed_when: out is failed and not out.rc == 1

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
Apologies. The playbook: * hosts: all gather_facts: false become: yes become_user: root tasks:- name: Get last yum update which includes "disablerepo" shell: 'history | grep -m 1 disablerepo' failed_when: out is failed and not out.rc == 1 register: out

Re: [ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
Thank you, Brian. Now, I want to print that output via debug, but am again running into "non-zero return code". On Thursday, March 21, 2024 at 10:52:09 AM UTC-4 Brian Coca wrote: > You can control the failure handling from the task using > 'failed_when', for example: > > failed_when: out is

[ansible-project] Getting past "non-zero return code"

2024-03-21 Thread Dimitri Yioulos
Good day. I want tp parse root's history to return the last occurrence of yum update that includes the string "disablerepo". I would have thought that this would work: * hosts: all gather_facts: false become: yes tasks:- name: Get last yum update which includes

Re: [ansible-project] Parsing a local file to get variables

2024-03-06 Thread Dimitri Yioulos
has to run on the command node, and must generate a file file on the command node. When I run "last" on dns1, it looks like the ansible user has tried to connect to it. On Wednesday, March 6, 2024 at 3:33:00 PM UTC-5 Dimitri Yioulos wrote: > Ah, I thought I was done with this. But,no

Re: [ansible-project] Parsing a local file to get variables

2024-03-06 Thread Dimitri Yioulos
: ansible.builtin.shell /etc/ansible/playbooks/files/renew_le_domain.pl {{ domain }} ~ This is the last piece I need to make this work completely. On Wednesday, March 6, 2024 at 11:52:00 AM UTC-5 Dimitri Yioulos wrote: > Hey, Stuart. Yup, use of set_fact was really the key (pardon the

Re: [ansible-project] Parsing a local file to get variables

2024-03-06 Thread Dimitri Yioulos
t; register: cert_content > > > > - name: Set cert variables from file > > set_fact: > > acmechallenge1: "{{ cert_content.stdout_lines[1] }}" > > acmechallenge2: "{{ cert_content.stdout_lines[2] }}" > > > &g

[ansible-project] Parsing a local file to get variables

2024-03-06 Thread Dimitri Yioulos
Good morning. Here's a bit of a challenge. I'm working on a playbook to get certs from letsencrypt, then put those into zone files. Rather than use the Ansible letsencrypt module, we've written a Perl script to get the certs. For each domain that we get certs for, a separate file named -le.txt

Re: [ansible-project] Getting complete package update information

2024-03-06 Thread Dimitri Yioulos
Thanks, Nico. dnf check-update doesn't quite return the values that I'm looking for. On Thursday, February 29, 2024 at 7:38:08 PM UTC-5 Nico Kadel-Garcia wrote: > On Wed, Feb 28, 2024 at 3:42 PM Dimitri Yioulos wrote: > > > > Stephen, if you mean add that parameter to the d

Re: [ansible-project] Getting complete package update information

2024-02-28 Thread Dimitri Yioulos
s, if you add > `security: yes` does that solve your issue ? > > > Steve. > > > > On 28 Feb 2024, at 14:25, Dimitri Yioulos wrote: > > The following playbook gets packages available for update, returning > package name and version: > > > > &g

[ansible-project] Getting complete package update information

2024-02-28 Thread Dimitri Yioulos
The following playbook gets packages available for update, returning package name and version: * hosts: all gather_facts: false vars:my_packages: "{{ dict(packages.results|groupby('name')) }}" tasks:- name: Check packages to upgrade dnf:list:

Re: [ansible-project] vars_prompt variables carry over into next tasks

2024-02-21 Thread Dimitri Yioulos
number of the created pems" > > private: no > > > tasks: > > - set_fact: > > pemno: "{{ pemno }}" > > > - hosts: all > > gather_facts: false > > become: false > > > tasks: > > - debug: var=pemno >

Re: [ansible-project] vars_prompt variables carry over into next tasks

2024-02-21 Thread Dimitri Yioulos
uary 20, 2024 at 9:15:29 AM UTC-5 Dick Visser wrote: > I *think* the vars from vars_prompt are tied to localhost in the first > play, so if you need them in any next plays, you would need to reference > them as localhost's hostvars: > > {{ hostvars['localhost'].pemno }} > >

[ansible-project] vars_prompt variables carry over into next tasks

2024-02-20 Thread Dimitri Yioulos
Good morning. In the following playbook, i have prompts to capture certain information. The created variables work fine in the first set of tasks in the playbook. However, they don't carry over into the second set of tasks in the playbook, based on what I've tried (as seen in the playbook,

Re: [ansible-project] Get copy src from variable

2024-02-14 Thread Dimitri Yioulos
Thank you, Todd! That works. I thought I had tried that previously, and it failed. I must have done it wrong. On Wednesday, February 14, 2024 at 10:21:38 AM UTC-5 Todd Lewis wrote: > - { src: "{{ var_containing_package1 }}" } > > > On 2/14/24 9:00 AM, Dimitri Yioulos w

[ansible-project] Get copy src from variable

2024-02-14 Thread Dimitri Yioulos
I have plays in a playbook to copy files to a remote host, then delete them at the end of the task list. This is the copy play: *- name: Copy files to host copy:src: "{{ item.src }}" dest: /tmpmode: u=rwx,g=rw,o=rw with_items:- { src:

Re: [ansible-project] Another report creation problem

2024-02-12 Thread Dimitri Yioulos
I hope i don't upset the list if i give this a bump, as i'd really like to get a solution. Please see my previous post above. On Friday, January 26, 2024 at 9:24:28 AM UTC-5 Dimitri Yioulos wrote: > Good day, everyone. I've continued this thread because, although I'm > getting a

Re: [ansible-project] Another report creation problem

2024-01-26 Thread Dimitri Yioulos
; {% endfor %} > {% endfor %} > On Mon, 15 Jan 2024 at 18:00, Dimitri Yioulos wrote: > >> Todd, just before your last posy, i tried *| to_nice_json * and*| >> to_nice_yaml* , both of which worked, to a point. >> >> Here's what I'm after: >> >>

Re: [ansible-project] Another report creation problem

2024-01-15 Thread Dimitri Yioulos
| to_nice_json }} > > What kind of list did you have in mind? > > On Monday, January 15, 2024 at 10:53:29 AM UTC-5 Dimitri Yioulos wrote: > >> Ah, Todd, you were right. I changed the output path, and it worked. I'm >> not sure why i couldn't write to the /tmp directory

Re: [ansible-project] Another report creation problem

2024-01-15 Thread Dimitri Yioulos
esented with those messages, the first thing I'd check is whether a file > name '/tmp/installed.txt' already exists on the controller. > > On Monday, January 15, 2024 at 10:19:08 AM UTC-5 Dimitri Yioulos wrote: > >> For Vladimir's solution, I get the following error: >> >

Re: [ansible-project] Another report creation problem

2024-01-15 Thread Dimitri Yioulos
b''/tmp/.ansible_tmpkdy1r8msinstalled.txt'': [Errno 1] Operation not permitted: b''/tmp/.ansible_tmpkdy1r8msinstalled.txt'' -> b''/tmp/installed.txt'''* On Monday, January 15, 2024 at 10:04:55 AM UTC-5 Dimitri Yioulos wrote: > As I have written the playbook above, here's the error, which I hope is > enough f

Re: [ansible-project] Another report creation problem

2024-01-15 Thread Dimitri Yioulos
rt play does not work", but you don't tell us in what way > it doesn't work. Is there a template error, undefined variable, or > something else? Does running with -vv -D indicate anything? "Does not work" > is too vague. Okay, so it didn't do what you expected, but what did it

[ansible-project] Re: Another report creation problem

2024-01-15 Thread Dimitri Yioulos
el9 - libblockdev-loop-2.28-7.el9 - libfastjson-0.99.9-5.el9 On Monday, January 15, 2024 at 8:00:13 AM UTC-5 Dimitri Yioulos wrote: > Good morning. > > Let me start by saying that I hope I'm not overdoing my asks. I only do it > when I've tried, but failed, at a solution. Nextly, I

[ansible-project] Another report creation problem

2024-01-15 Thread Dimitri Yioulos
Good morning. Let me start by saying that I hope I'm not overdoing my asks. I only do it when I've tried, but failed, at a solution. Nextly, I hope your kind answers help others, as well. That said, the following playbook returns packages that are set for update: --- - hosts: all

Re: [ansible-project] Trying to replace single quote with regex_replace

2024-01-12 Thread Dimitri Yioulos
Thanks, Vladimir. Forgive my stupidity but, for my edification, how is that actually written in the playbook? On Wednesday, January 10, 2024 at 12:24:40 PM UTC-5 Rowe, Walter P. (Fed) wrote: > Even better! Brilliant! > > > Walter > -- > Walter Rowe, Division Chief > Infrastructure Services

Re: [ansible-project] Trying to replace single quote with regex_replace

2024-01-10 Thread Dimitri Yioulos
Walter, to further my knowledge, would you mind explaining further what this regex \"([\\[\\]'])\",' does? Is the regex specifi to regex_replace? On Wednesday, January 10, 2024 at 10:33:53 AM UTC-5 Dimitri Yioulos wrote: > Walter, that worked, and thanks so much! I both appreci

Re: [ansible-project] Trying to replace single quote with regex_replace

2024-01-10 Thread Dimitri Yioulos
single-quote-character-from-a-string > > Walter > -- > Walter Rowe, Division Chief > Infrastructure Services Division > Mobile: 202.355.4123 <(202)%20355-4123> > > On Jan 10, 2024, at 9:27 AM, Rowe, Walter P. (Fed) > wrote: > > Have you tried: > > *regex_r

Re: [ansible-project] Trying to replace single quote with regex_replace

2024-01-10 Thread Dimitri Yioulos
vices Division > Mobile: 202.355.4123 <(202)%20355-4123> > > On Jan 10, 2024, at 9:08 AM, Dimitri Yioulos wrote: > > Hello, all. > > I'm working with VMware modules in removing snapshots across all vCenter > folders. In order for this to work, I first ha

[ansible-project] Trying to replace single quote with regex_replace

2024-01-10 Thread Dimitri Yioulos
Hello, all. I'm working with VMware modules in removing snapshots across all vCenter folders. In order for this to work, I first have to get the folders in which the virtual machines live. Here's the playbook: * hosts: all become: false gather_facts: false

Re: [ansible-project] Playbook for VMware help

2023-12-22 Thread Dimitri Yioulos
nfo']|default("None", false) }} > > {% endif %} > {% endfor -%} > > Cheers, > -- > Todd > > > On 12/22/23 8:43 AM, Dimitri Yioulos wrote: > > Season's greetings, all. > > I've created a playbook to generate a report of all VMware guests

[ansible-project] Playbook for VMware help

2023-12-22 Thread Dimitri Yioulos
Season's greetings, all. I've created a playbook to generate a report of all VMware guests (vms) which have snapshots: --- - hosts: all gather_facts: false vars_prompt: - name: "vcenter_username" prompt: "Enter your Vcenter username" private: no - name:

[ansible-project] Copy to report

2023-12-08 Thread Dimitri Yioulos
Good day! I guess I'm fond of creating reports from debug output. Well, actually, I have a business case for doing so. I have a couple of playbooks that I've set up to create report: playbook 1 - --- - hosts: host1 gather_facts: false become: yes tasks: - name: yum_command

[ansible-project] Callin variables from vars_file

2023-12-07 Thread Dimitri Yioulos
Good day all! I've created a playbook to do some DNS work. There are basically two plays - one changes the zone's serial number, and the other adds TXT records. I get the zone files from a variables file in var_files (zones.yml). The first play works fine. As to the second play, I've created

Re: [ansible-project] jinja2 conditional help

2023-11-27 Thread Dimitri Yioulos
u need? > > cf: > - https://support.sendwithus.com/jinja/default/ > - > https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.default > > > On Mon, 27 Nov 2023 at 14:10, Dimitri Yioulos > wrote: > >> Good day, all. >> >> I've created a simple pac

[ansible-project] jinja2 conditional help

2023-11-27 Thread Dimitri Yioulos
Good day, all. I've created a simple package update playbook, which also creates a report of updated packages: - hosts: mytesthosts gather_facts: false become: yes tasks: - name: install all updates yum: name: '*' update_cache: yes state: latest -

Re: [ansible-project] lineinfile quoting

2023-11-14 Thread Dimitri Yioulos
serial number > lineinfile: > backrefs: true > dest: "{{ item }}" > regexp: '^(\s+)(\d{8})(\d{2})(\s+; Serial Number.*)' > line: '\g<1>{{ new_serials[item] }}\g<4>' > loop: "{{ add_txt.results | selectattr('

Re: [ansible-project] lineinfile quoting

2023-11-13 Thread Dimitri Yioulos
be good to auto-increment the serial number's last two digits (e.g. 20231113*01* to 20231113*02 *on every run of the playbook. Is that possible? On Monday, November 13, 2023 at 10:49:06 AM UTC-5 Dimitri Yioulos wrote: > Thanks, Todd! with your hints, I was able to get the results I want. > > Ho

Re: [ansible-project] lineinfile quoting

2023-11-13 Thread Dimitri Yioulos
t; dest: /somedir/somefile > insertafter: EOF > line: '_some-name TXT > "aZJACEhonRJiOCL1ZtkKMKnx7U 4m5j bSswyClGb6wGk"' > > It isn't wrong. It just looks weird when you're used to the other style. > > Cheers, >

Re: [ansible-project] lineinfile quoting

2023-11-10 Thread Dimitri Yioulos
Todd Lewis wrote: > Single-quoted strings can contain double-quotes. So instead of > > line="something ending with a "double-quoted string"" > > do this: > > line='something ending with a "double-quoted string"' > > > On 11/10/2

[ansible-project] lineinfile quoting

2023-11-10 Thread Dimitri Yioulos
Good day, all. I want to add the following line to a file: _some-name TXT "aZJACEhonRJiOCL1ZtkKMKnx7U4m5jbSswyClGb6wGk" I would think I'd use the following: lineinfile: dest=/somedir/somefile insertafter=EOF line="_acme-challenge

[ansible-project] lineinfile quoting

2023-11-10 Thread Dimitri Yioulos
Good day, all. I want to add the following line to a file: _some-name TXT "aZJACEhonRJiOCL1ZtkKMKnx7U4m5jbSswyClGb6wGk" I would think I'd use the following: lineinfile: dest=/somedir/somefile insertafter=EOF line="_acme-challenge

[ansible-project] lineinfile quoting

2023-11-10 Thread Dimitri Yioulos
Good day, all. I want to add the following line to a file: _some-name TXT "aZJACEhonRJiOCL1ZtkKMKnx7U4m5jbSswyClGb6wGk" I would think I'd use the following: lineinfile: dest=/var/named/chroot/var/named/trioboiler.com.hosts insertafter=EOF

Re: [ansible-project] Ansible ping report

2023-11-08 Thread Dimitri Yioulos
nably format a code in Google Groups?) > On Tuesday, November 7, 2023 at 6:55:50 PM UTC+1 dbs34 wrote: > >> would you mind sharing the whole, newly updated playbook? thank you! >> >> On Monday, November 6, 2023 at 2:58:31 PM UTC-5 Vladimir Botka wrote: >> >>> O

Re: [ansible-project] Ansible ping report

2023-11-06 Thread Dimitri Yioulos
Thanks, Brian. I suspected that was the case (I did read doc for the module), but was hoping there was some work-around. I'm still interested in trying to generate some type of report from Ansible ping. As you can see from the playbook I posted, that uses ICMP ping, which is not what I'm

[ansible-project] Ansible ping report

2023-11-06 Thread Dimitri Yioulos
Hi, All. It's been some time since I used Ansible, and this list. I'm happy to be back using both. I've created a [playbook to run pin, and create a report of output: --- - name: check reachable hosts hosts: dytest gather_facts: no tasks: - name: Ping each host ansible.builtin.command: ping

[ansible-project] Re: Aggregating debug msg output

2021-09-16 Thread Dimitri Yioulos
Thanks, Roland. The fact is, I'd like to "aggregate" (for lack of a better term) any debug msg output, regardless of what information the playbook is trying to gather. The one I posted above is for descriptive purposes. Rather than have output of the playbook look like this: PLAY [all]

[ansible-project] Aggregating debug msg output

2021-09-16 Thread Dimitri Yioulos
Taking, e.g., the following simple playbook: --- - hosts: all gather_facts: false serial: 1 tasks: - name: system date command: date register: date_out - name: print system date debug: msg: "Hostname is: {{ inventory_hostname }} and System date is: {{

Re: [ansible-project] select/reject filter parameters

2021-05-04 Thread Dimitri Yioulos
VM (build 24.71-b01, mixed mode)'] On Tue, May 4, 2021 at 7:34 AM Dimitri Yioulos < dimitri.yiou...@endurance.com> wrote: > OK, almost got this! And, I probably didn't explain what I'm after very > well. Based on the code you just provided, this is the output, e.g.: > >

Re: [ansible-project] select/reject filter parameters

2021-05-04 Thread Dimitri Yioulos
How do I adjust the code to do that? On Tue, May 4, 2021 at 7:15 AM Vladimir Botka wrote: > On Tue, 4 May 2021 04:00:25 -0700 (PDT) > Dimitri Yioulos wrote: > > > This: > > > > myserver1.mydomain.com > > ['java version "1.7.0_71"', 'Java(TM) SE Runtime Environ

Re: [ansible-project] select/reject filter parameters

2021-05-04 Thread Dimitri Yioulos
.7.0_71-b14)', 'Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)'] On Tuesday, May 4, 2021 at 6:07:00 AM UTC-4 vbo...@gmail.com wrote: > On Tue, 4 May 2021 12:05:36 +0200 > Vladimir Botka wrote: > > On Tue, 4 May 2021 05:27:53 -0400 > Dimitri Yioulos wrote: >

Re: [ansible-project] select/reject filter parameters

2021-05-04 Thread Dimitri Yioulos
ts/prodjava.txt" run_once: yes Assuming I remove " | select('contains', 'Java(TM)')", where would I plug in the code you recommend? On Mon, May 3, 2021 at 7:21 PM Vladimir Botka wrote: > On Mon, 3 May 2021 14:15:14 -0700 (PDT) > Dimitri Yioulos wrote: > > > In for exa

[ansible-project] select/reject filter parameters

2021-05-03 Thread Dimitri Yioulos
In for example, the following: {{ hostvars[host]['java_one']['stderr_lines'] | reject('contains', 'OpenJDK') }} or {{ hostvars[host]['java_one']['stderr_lines'] | select('contains', 'Java(TM)') }} how can i add a second value to select or reject? I want the action to take place if "OpenJDK"

[ansible-project] Re: Complete debug output to file

2021-04-30 Thread Dimitri Yioulos
ot getting the desired result. How do I do that? On Monday, April 26, 2021 at 11:28:49 AM UTC-4 Dimitri Yioulos wrote: > Racke, > > For my edification, might I ask exactly what your code does? > > Thanks, > > Dimitri > > On Monday, April 26, 2021 at 9:03:19 AM UTC-

[ansible-project] Re: Complete debug output to file

2021-04-30 Thread Dimitri Yioulos
ot getting the desired result. How do I do that? On Monday, April 26, 2021 at 11:28:49 AM UTC-4 Dimitri Yioulos wrote: > Racke, > > For my edification, might I ask exactly what your code does? > > Thanks, > > Dimitri > > On Monday, April 26, 2021 at 9:03:19 AM UTC-

[ansible-project] Re: Complete debug output to file

2021-04-26 Thread Dimitri Yioulos
Racke, For my edification, might I ask exactly what your code does? Thanks, Dimitri On Monday, April 26, 2021 at 9:03:19 AM UTC-4 Dimitri Yioulos wrote: > Hello, all. > > It's been a long time since I posted here, so please forgive any posting > faux pas. > > I've cre

[ansible-project] Re: Complete debug output to file

2021-04-26 Thread Dimitri Yioulos
That worked great; thank you so much! On Monday, April 26, 2021 at 9:03:19 AM UTC-4 Dimitri Yioulos wrote: > Hello, all. > > It's been a long time since I posted here, so please forgive any posting > faux pas. > > I've created the following playboos: > > --- >

[ansible-project] Complete debug output to file

2021-04-26 Thread Dimitri Yioulos
Hello, all. It's been a long time since I posted here, so please forgive any posting faux pas. I've created the following playboos: --- - name: report aws migrator hosts: all gather_facts: false tasks: - name: collect facts shell: cmd: facter -p fqdn processorcount

[ansible-project] Re: Using "shell" with a switch

2018-12-05 Thread Dimitri Yioulos
; "delta": "0:00:04.582864", > "end": "2018-12-05 09:41:14.641125", > "invocation": { > "module_args": { > "_raw_params": "/scripts/dnscopy.pl -f", > "_uses

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
that are identified in the script? Dimitri On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to run a script residing on the remote machine with a switch, as in > "/scripts/myscript -f" (it must be executed by root). I'm using the shel

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
Dimitri On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to run a script residing on the remote machine with a switch, as in > "/scripts/myscript -f" (it must be executed by root). I'm using the shell > module, but ca

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
ec "rndc": No such file or directory at ./dnscopy.pl line 296. rndc -s dns1 reload failed: No such file or directory at ./dnscopy.pl line 296. If I run the script on the remote host with su - root, I get: server reload successful On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yi

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
I thought that's what I should do. I made those changes, but then the playbook is stuck/runs without completion (until it ultimately times out, I'm guessing). On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to run a scr

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
Sorry, Kai, I'm not understanding what the playbook should look like. I'm a bit slow on the uptake. On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to run a script residing on the remote machine with a switch, as in > "

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
: yes tasks: - shell: /scripts/dnscopy.pl -f register: script_output - debug: var: script_output.stdout_lines Continued help very much apprecuated. On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to run a scr

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
quot;, "rndc -s dns1 reload failed: No such file or directory at /scripts/dnscopy.pl line 296."], "stdout": "", "stdout_lines": []} Your continued help (or anybody else's) would be appreciated. Dimitri On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimi

[ansible-project] Re: Using "shell" with a switch

2018-12-04 Thread Dimitri Yioulos
Thank you, Piotr. All good, now. You're right, and this is a mistake I shouldn't have made, given my long history with Ansible. But, hey, never too late to learn. Thanks, again. On Monday, December 3, 2018 at 11:44:08 AM UTC-5, Dimitri Yioulos wrote: > > Hey, all. > > I need to

[ansible-project] Re: Using "shell" with a switch

2018-12-03 Thread Dimitri Yioulos
reload failed: No such file or directory at /scripts/dnscopy.pl line 296.", "stderr_lines": ["Can't exec \"rndc\": No such file or directory at /scripts/dnscopy.pl line 296.", "rndc -s dns1 reload failed: No such file or directory at /scripts/dnscopy.pl lin

[ansible-project] Using "shell" with a switch

2018-12-03 Thread Dimitri Yioulos
Hey, all. I need to run a script residing on the remote machine with a switch, as in "/scripts/myscript -f" (it must be executed by root). I'm using the shell module, but can find no way to add the switch without the play failing. Help would be appreciated. Dimitri -- You received this

[ansible-project] Re: Understanding the script module

2018-11-21 Thread Dimitri Yioulos
OK, and thanks, as always for your input/insight. I figured that when I first used the script module, and it "failed". That's when I turned to local_action. Still, I think that the documentation could be a bit more clear. On Wednesday, November 21, 2018 at 10:19:44 AM UTC-

[ansible-project] Re: Understanding the script module

2018-11-21 Thread Dimitri Yioulos
t what is says, that there's no need for python to be installed on the Windows systems in which the script is being executed. On Wednesday, November 21, 2018 at 10:19:44 AM UTC-5, Dimitri Yioulos wrote: > > Hello, all. > > We have an occasional need to update a particular piece

[ansible-project] Understanding the script module

2018-11-21 Thread Dimitri Yioulos
Hello, all. We have an occasional need to update a particular piece of a core business application across a number of Windows servers. The process involves a number of steps, most done via the application UI. It's tedious and time consuming so, of course, I've created a python script to do

[ansible-project] Re: PowerShell script help

2018-10-19 Thread Dimitri Yioulos
Thanks, again, Jordan. Yes, when I look more closely, I saw that, and fixed it in the script. All's well now. On Thursday, October 18, 2018 at 9:42:41 AM UTC-4, Dimitri Yioulos wrote: > > Hi, all. > > I've created a playbook to run a PowerShell script. The script is alrea

[ansible-project] Re: PowerShell script help

2018-10-18 Thread Dimitri Yioulos
\\command_update.ps1:232 char:8", "+ } else {", "+~", "Missing closing '}' in statement block or type definition.", "+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx ", " ception", "+ FullyQualified

[ansible-project] PowerShell script help

2018-10-18 Thread Dimitri Yioulos
Hi, all. I've created a playbook to run a PowerShell script. The script is already copied to the target system (but also exists on the Ansible server). It must be run with the following argument: -ConsoleTitle "Dell Command | Update" I've tried every module I can think of, with every way to

[ansible-project] Re: Need a register value to persist

2018-08-24 Thread Dimitri Yioulos
Yup! Did this: hostvars['Host1'].import_job_count.stdout == "0" , and it worked a treat. I really appreciate your help!!! On Friday, August 24, 2018 at 8:44:40 AM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I've created the following playbook: > > --- >>

[ansible-project] Re: Need a register value to persist

2018-08-24 Thread Dimitri Yioulos
Thanks for the "with_items tip. Please allow me to ask this again: the value of " import_job_count" must be 0 (zero) in order for the play to proceed. How do I do that? On Friday, August 24, 2018 at 8:44:40 AM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > >

[ansible-project] Re: Need a register value to persist

2018-08-24 Thread Dimitri Yioulos
Actually, the value of " import_job_count" must be 0 (zero) in order for the play to proceed. How do I do that? On Friday, August 24, 2018 at 8:44:40 AM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I've created the following playbook: > > --- >> - hos

[ansible-project] Re: Need a register value to persist

2018-08-24 Thread Dimitri Yioulos
that seem right to you? On Friday, August 24, 2018 at 8:44:40 AM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I've created the following playbook: > > --- >> - hosts: Host1 >> gather_facts: false >> tasks: >> - name: SQL Query Pending Import Jo

[ansible-project] Need a register value to persist

2018-08-24 Thread Dimitri Yioulos
Hello, all. I've created the following playbook: --- > - hosts: Host1 > gather_facts: false > tasks: > - name: SQL Query Pending Import Jobs > script: /etc/ansible/files/mssql_opm_getImportJobs.ps1 > register: import_job_count > - debug: > msg: "Number of running

[ansible-project] Re: Use of vmware_guest module

2018-08-16 Thread Dimitri Yioulos
Doing this" --- - hosts: localhost gather_facts: false *serial: 1* vars: ~ doesn't seem to help. Any help would be appreciated. On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I need to create a playbook which will incl

[ansible-project] Re: Use of vmware_guest module

2018-08-15 Thread Dimitri Yioulos
wait_for_ip_address: no state: "{{ vm_state }}" How might I get vm1 to complete it's start prior to vm2 beginning its restart? It's important that this be accomplished. Thanks. On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote: > >

[ansible-project] Re: Use of vmware_guest module

2018-08-14 Thread Dimitri Yioulos
I'll answer my own question - yes "with_items" works, and in the order in which the items are listed. On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I need to create a playbook which will include shutting down, then > restart

[ansible-project] Re: Use of vmware_guest module

2018-08-14 Thread Dimitri Yioulos
As in "with_items". If so, would the shut-downs/start-ups be in the order of the "with_items" list? On Tuesday, August 14, 2018 at 3:38:03 PM UTC-4, Dimitri Yioulos wrote: > > Hello, all. > > I need to create a playbook which will include shutting down, then &g

[ansible-project] Use of vmware_guest module

2018-08-14 Thread Dimitri Yioulos
Hello, all. I need to create a playbook which will include shutting down, then restarting, six virtual machines. The shut-downs/start-ups must be done on the machines in specific order (start-ups in reverse order of shut-downs). Since they are virtual, I was thinking of using the

[ansible-project] Re: Trouble with win_package

2018-02-14 Thread Dimitri Yioulos
path should read: path: C:\temp\windows6.1-kb3140245-x64_5b067ffb69a94a6e5f9da89ce88c65 8e52a0dec0.msu On Wednesday, February 14, 2018 at 1:16:43 PM UTC-5, Dimitri Yioulos wrote: > > All, > > I'm running version 2.3 (can't update to 2.4 just yet) and, despite what > should

  1   2   >