[ansible-project] Adding AD User to a local linux group

2022-11-14 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, Is there a way to add an AD user to a local linux group? the user function doesn't work because it's only looking in /etc/passwd for this user. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Importing multiple ansible playbooks

2022-11-02 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, Is there a way, or what is the syntax since I can't seem to find it on importing an ansible playbook and with that applying a specific tag to one or some of those playbooks? --- # Add tsg keys - import_playbook: tsg.yml - import_playbook: tsgkey.yml # Connect to RHSM - import_playbook:

Re: [ansible-project] Trying to gather facts to write to local file on ansible server

2021-09-29 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Dang! Thank you! On Wed, Sep 29, 2021 at 2:15 PM Matt Martz wrote: > Your output doesn't match the provided play, however, I'm guessing you > need a `become: no` on the task that has `delegate_to: localhost` on it. > > On Wed, Sep 29, 2021 at 3:13 PM 'Chris Bidwell - NOAA Federal'

[ansible-project] Trying to gather facts to write to local file on ansible server

2021-09-29 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all! So this has worked at one point but is no longer. I'm trying to gather information on each of my rhel clients and write that information to one file on my answer server. Here is my playbook: --- - hosts: 'ALL_LINUX' become: yes become_method: sudo vars_files: - passwd.yml

[ansible-project] Getting a errors with ansible checks...

2021-03-09 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, I am routinely getting this error running a playbook. I've verified that python3-dnf IS installed, so I'm not sure why it's complaining here. failed: [dido-test] (item=['puppet-agent', 'puppet5-release']) => {"ansible_loop_var": "item", "changed": false, "cmd": "dnf install -y

Re: [ansible-project] How can I use with_items twice in a single tasks?

2021-03-08 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
I think this would be your syntax: - name: setup directory permissions file: path: "{{ item.path }}" state: "{{ item.state }}" mode: "{{ item.mode }}" owner: "{{ item.owner }}" group: "{{ item.group }}" with_items: - { path:

[ansible-project] Ansible writing to a file

2021-03-03 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, So I'm trying to write to a local file from my ansible server based off information I've gotten from my inventory hosts. For some reason, it keeps creating the file ON the inventory host instead of my ansible server. Here is my playbook: --- - hosts: ALL_LINUX become: yes

[ansible-project] Writing output to ansible server local file

2021-02-09 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, I've tried this and it's worked before but after an upgrade some time ago, it stopped working. I haven't used it in ages. Anyway, if I want to get variables about my inventory: mac address, ip, os version, etc., and write that to a file, what would be my syntax on doing this? -- You

Re: [ansible-project] ansible yum install

2020-11-20 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
de/playbooks_environment.html#setting-the-remote-environment-in-a-task > > On Fri, 20 Nov 2020 at 17:55, 'Chris Bidwell - NOAA Federal' via > Ansible Project wrote: > > > > Hi all! Curious how I could do this using the yum module, or should I > just run this command as she

[ansible-project] ansible yum install

2020-11-20 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all! Curious how I could do this using the yum module, or should I just run this command as shell or "command"? WAZUH_MANAGER="10.0.0.2" yum install wazuh-agent So essentially setting this variable and applying it to this install. -- You received this message because you are subscribed to

[ansible-project] Search and remove string that matches a pattern at beginning of a line

2020-11-02 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, Interesting question here. I want to remove the string noexec out of a line in my /etc/fstab. In this instance, I only want it to be in the /tmp line. I was thinking a replace module, but not sure about a regexp that would work. Any thoughts? # # /etc/fstab # Created by anaconda on

Re: [ansible-project] new ansible server build

2020-09-16 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
ote: > Hii > > On Wed, 16 Sep 2020 at 04:27, 'Chris Bidwell - NOAA Federal' via > Ansible Project wrote: > > > > Hi all, so this may be simple but I can't seem to figure it out. :( > > > > I built a new RHEL8 server from my RHEL7 system and ran my playbooks

[ansible-project] new ansible server build

2020-09-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, so this may be simple but I can't seem to figure it out. :( I built a new RHEL8 server from my RHEL7 system and ran my playbooks as normally would and now I'm getting these errors: WARNING]: sftp transfer mechanism failed on [host1-lx]. Use ANSIBLE_DEBUG=1 to see detailed information

[ansible-project] Re: lineinfile using insertafter

2020-07-18 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Because I've got checks that applies the proxy based of which subnet the playbook runs on. On Friday, July 17, 2020, Stefan Hornburg (Racke) wrote: > On 7/17/20 10:21 PM, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: >> Hey all, >> >> Trying to insert a line

[ansible-project] lineinfile using insertafter

2020-07-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, Trying to insert a line to multiple instances in the same file. I tried insertafter but that only put in one spot. Here's the code: - name: add proxy to zabbix.repo if needed lineinfile: path: /etc/yum.repos.d/zabbix.repo state: present insertafter:

Re: [ansible-project] environment proxy variable not working

2020-07-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
02590/AnsiballZ_dnf.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''Escalation succeeded* On Fri, Jul 17, 2020 at 11:09 AM Stefan Hornburg (Racke) wrote: > On 7/17/20 6:53 PM, 'Chris Bidwell - NOAA Federal' via Ansible Project > wrote: > > He

[ansible-project] environment proxy variable not working

2020-07-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, I'm having an issue trying to get ansible to use my environment variable to pull through a proxy server. Running: ansible 2.9.10 Here's my variable declarations: --- - name: puppet5 hosts: ALL_LINUX become: yes vars_files: - passwd.yml - vars.yml vars: os_version:

Re: [ansible-project] ansible - rhel8

2020-07-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
iptables service: name: iptables state: restarted tags: IPTABLES - name: yum clean all shell: yum clean all On Wed, Jul 15, 2020 at 12:24 PM vinoth kumar wrote: > Where is your actual tasks starts ? > > Tasks is missing > > On Wed 15. Jul 2020

[ansible-project] ansible - rhel8

2020-07-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, having an interesting issue with my latest rhel8 installation. Trying to install an rpm from a URL. Here's my playbook: --- - name: Install zabbix hosts: ALL_LINUX become: yes vars_files: - passwd.yml - vars.yml ignore_errors: yes vars: os_version: "{{

Re: [ansible-project] Updated ansible failed on checks

2019-11-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Thanks all! On Fri, Nov 15, 2019 at 11:56 AM Vladimir Botka wrote: > On Fri, 15 Nov 2019 11:28:44 -0500 > Sam Doran wrote: > > > Vlado, > > You're not missing anything. The version_compare test still exists, is > not > > deprecated, and is fine to use — just not as a filter. > > We used to

[ansible-project] Updated ansible failed on checks

2019-11-14 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, After running ansible 2.9, I'm getting these errors: fatal: [jjohnson-lx]: FAILED! => {"msg": "The conditional check 'ansible_distribution_major_version | version_compare('6', '=')' failed. The error was: template error while templating string: no filter named 'version_compare'. String:

[ansible-project] Playbook run order

2019-11-13 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all! Just a simple question but it may be just looking into it too deep. I've got several playbooks that I run sequentially manually during a server build. How would I create a separate playbook and call these other playbooks in their respective order? Thanks! -- You received this message

[ansible-project] Get number based off inventory criteria

2019-10-28 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all Is there any way to output a growing count of, let's say, systems that match a specific RH version or RH type (Workstation or Server). Like an end result showing 35 Servers, or 42 Workstations, etc. Thanks! Chris -- You received this message because you are subscribed to the Google

Re: [ansible-project] Reboot wait for port to come available

2019-10-23 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Doesn't this use the ansible server running the playbook to check if the port is open? On Tue, Oct 22, 2019 at 5:07 PM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 23.10.2019 00:42, 'Chris Bidwell - NOAA Federal' via Ansible Project > wrote: > > Hi all, >

[ansible-project] Reboot wait for port to come available

2019-10-22 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, So I know how to do this for the most part, but I've got two servers that when I have to reboot them, one needs to be done before the other and cannot before a specific port comes available. That port is only accessible from that second server, not the ansible server itself. Does that

[ansible-project] Running specific tasks depending on subnet

2019-06-19 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Does anyone know how I can run a task based off the subnet I'm in? For example, We've got an internal network that needs to pull packages through yum, but within that subnet, we need to go through a proxy to get out. So something like if my IP is 192.168.223.x to use this task and if I'm

[ansible-project] yum install through proxy

2019-06-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, Is there any way to install an rpm through the yum module and direct that install through a proxy? Thanks! Chris -- 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

[ansible-project] jinja2 warnings

2019-06-06 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, After the latest ansible upgrade, I've started seeing these alerts when running playbooks: [WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ rhel7stig_complexity_high or rhel7stig_audit_complex }} Running ansible 2.8.0

[ansible-project] AWX Setup

2019-04-26 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, has anyone out there ever setup AWX? How much different is it than tower? If you have set this up, do you have a good step-by-step instructions? Thx! Chris -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

Re: [ansible-project] Ansible Playbook output to local file

2019-03-08 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
create: yes delegate_to: localhost run_once: yes with_items: "{{ ansible_play_hosts }}" On Fri, Mar 8, 2019 at 9:38 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 08.03.2019 17:03, 'Chris Bidwell - NOAA Federal' via Ansible Project > wrote:

[ansible-project] Ansible Playbook output to local file

2019-03-08 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, So I've got this playbook that is getting information from all of my hosts in my inventory and outputting that data to a local file. However, it's not outputting on EVERY inventory host. It's going through the list like it's supposed to be, but it's not putting everything in the file.

[ansible-project] authorized_keys module

2019-02-06 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, I'm trying to add pubkeys to several users and I'm getting an error message. Here's the playbook: --- - name: Add users and pubkeys hosts: server1 become: yes vars_files: - passwd.yml - vars.yml tasks: - name: "Add users to gong server" user: name: "{{

[ansible-project] Logging into my local system w/ ansible

2019-01-30 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, So I've got a playbook that runs and in my hosts list is the system running the checks themselves...it can't seem to login to itself. I get this error: fatal: [ansible-lx]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been

Re: [ansible-project] Running yum updates with ansible

2019-01-29 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
the OS side. > > On Tue, Jan 29, 2019 at 12:25 PM 'Chris Bidwell - NOAA Federal' via > Ansible Project wrote: > >> So does anyone have any recommendations on how to alleviate >> this problem? Perhaps some sort of delay before exiting or something? >> >> On Tue, Jan

Re: [ansible-project] Running yum updates with ansible

2019-01-29 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
o blame it on Ansible, though. >> >> --Steve >> >> On Mon, Jan 28, 2019 at 5:02 PM 'Chris Bidwell - NOAA Federal' via >> Ansible Project wrote: >> > >> > Hey all, >> > >> > So I've done a lot of yum updates with ansible an

[ansible-project] Running yum updates with ansible

2019-01-28 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, So I've done a lot of yum updates with ansible and several times I get issues where partial updates are run and it says it's been completed, however, I reboot and I'm in a kernel panic because the new kernel didn't update properly so I have to revert to the previous kernel and remove the

[ansible-project] Adding rhn channels via ansible

2018-12-19 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, How's it going? So I'm trying to create a playbook that will add rhn-channels to servers based on both Server/Workstation. Here's my pb: --- - name: Register RHN Channel hosts: GONG become: yes vars_files: - passwd.yml - vars.yml vars: ansible: "{{

[ansible-project] Determine which network a host is on

2018-10-30 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
So I've got a playbook I've written where the config is different depending on the network it resides on. How can I determine this and be able to save the network as a variable? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] Ansible 2.6.6 is available

2018-10-19 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Um, isn't 2.7 out? On Friday, October 19, 2018, Matt Clay wrote: > Hi all -- we're happy to announce that the general release of Ansible > 2.6.6 is now available! > > > How do you get it? > -- > > $ pip install ansible==2.6.6

[ansible-project] Ansible 2.7 yum module issues

2018-10-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Anyone notice weirdness with ansible 2.7? I'm running 2.7.0 and the yum module doesn't seem to be working as it's supposed to. Previous ran ansible 2.6.x with success. Same module under 2.7.0: fatal: [172.23.10.2]: FAILED! => {"changed": false, "msg": "Error from repoquery:

Re: [ansible-project] Re: Trying to copy script from local to remote and run

2018-10-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
. On Wed, Oct 17, 2018 at 5:41 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 17.10.2018 13:26, 'Chris Bidwell - NOAA Federal' via Ansible Project > wrote: > > I've tried that with the same results. Hmm > > The best is probably starting with basic. > >

[ansible-project] Re: Trying to copy script from local to remote and run

2018-10-17 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
I've tried that with the same results. Hmm On Wednesday, October 17, 2018, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 17.10.2018 01:09, 'Chris Bidwell - NOAA Federal' via Ansible Project > wrote: > >> So I simplified my playbook a bit. I disabled se

Re: [ansible-project] Trying to copy script from local to remote and run

2018-10-16 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
_src option"} On Mon, Oct 15, 2018 at 10:45 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Thursday, 11 October 2018 22.30.13 CEST 'Chris Bidwell - NOAA Federal' > via Ansible Project wrote: > > cat check_for_reboot.yml > > --- > > -

[ansible-project] Ending summary of a playbook

2018-10-12 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, Is there any way to write out where I would get a summary of a playbook, other than what is already given with the passes, fails, changed, etc. Let's say I write a playbook listing all servers/workstations that need to be rebooted after a kernel patch. Is there a way to do this? I've

[ansible-project] Trying to copy script from local to remote and run

2018-10-11 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, me again! So I've got this playbook that *should* run fine but it dies at trying to copy. Now I don't know if it's because it can't find it locally having the problem copying it remotely. Here it is: cat check_for_reboot.yml --- - name: Check for reboot hosts: testserver become:

[ansible-project] Ansible Reboot Check

2018-10-10 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, take a look at this and lemme know where I'm hosed at. The errors are a bit misleading: --- - name: Check who needs reboots hosts: ALL_RHEL become: yes vars_files: - passwd.yml - vars.yml tasks: - name: check packages for updates shell: yum list updates |

[ansible-project] Conditional when based on grep results

2018-09-11 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, So I'm trying to do a check to see if a string exists in a file and to add if it does not. This is what I have: - name: exists in file command: "grep string /var/log/file" register: string_not_exist - name: run_if_exists command: "touch /tmp/add" when: string_not_exist.stdout

Re: [ansible-project] Warnings during ansible playbook run

2018-08-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
:48 AM, Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > Chris, > > what ansible version and what are you trying to do ? I haven't seen it > before. > > On Wed, Aug 15, 2018 at 12:42 PM 'Chris Bidwell - NOAA Federal' via > Ansible Project wrote: > >> H

[ansible-project] Warnings during ansible playbook run

2018-08-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Have you guys seen this before? What is causing this: Warning: Due to potential bad behaviour with rhnplugin and certificates, used slower repoquery calls instead of Yum API. Thanks! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To