[ansible-project] ansible-core 2.14 and determining if top level variables exist in source

2023-02-01 Thread Chris Nokes
a mistake in the nested elements, then an exception is desired. How can this use case be implemented in 2.14? 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 fr

Re: [ansible-project] Patching System with rollback function

2023-01-25 Thread Chris
but which are no longer required by any such package. I haven't tested this extensively, but it should be used with "state = absent" I'm personally a paranoid person, so test / test / test :) Chris On Wed, Jan 25, 2023 at 3:44 AM Fabiuscom wrote: > Hello, I need some informati

[ansible-project] Inventory from uploaded file

2023-01-09 Thread Chris Condon
I'm trying to create my inventory from WSUS. For me there are advantages in terms of capturing physical servers that aren't in vCenter. I am mostly there. On the WSUS server I have a PowerShell script that exports the list of servers in WSUS to INI and YML files that Ansible can understand. I

[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

Re: [ansible-project] Executing multiple roles in succession

2022-11-10 Thread Chris Bachmeyer
Hi, Walter, I have everything running as it should. It was my mistake. I didn't intend the full block in the initial email I sent this morning, only the block for the second role. The dynamic inventory is generated in the first role and passed to the second, and the end-to-end deployment of

[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] In a pickle...

2022-08-10 Thread Chris Jefferies
n application was installed with a command, it should uninstall with the same command. Perhaps there's a purge I missed. Seems uninstall leaves some bits of flotsam... Thanks for your help... On Wednesday, August 10, 2022 at 10:03:59 AM UTC-7 Chris Jefferies wrote: > Ack. Worse than I thought... H

Re: [ansible-project] In a pickle...

2022-08-10 Thread Chris Jefferies
environment > variable. Generally it will be `$HOME/.local/bin`. That new bin path > should be added before `/usr/local/bin` > > To remove the old version, you likely just need to do a `python3 uninstall > ansible`, just ensure the paths it informs you it will remove are within >

Re: [ansible-project] In a pickle...

2022-08-10 Thread Chris Jefferies
; > I wouldn't suggest simply upgrading to 2.9.1. 2.9.1 was released over 2.5 > years ago, and the 2.9 release is now end of life. You should consider > upgrading to at least ansible-core 2.12 (ansible 5.0) > > On Tue, Aug 9, 2022 at 11:50 PM Chris Jefferies wrote: > >>

[ansible-project] In a pickle...

2022-08-09 Thread Chris Jefferies
guessing I need to route out the 2.9 version but wanted some advice before i go... into the valley below. ;) Thanks for any tips... Chris. *The current state of things:* # ansible --version ansible 2.9.0 config file = /Users/user/Documents/code/gitlab/devops/ansible/base/ansible.cfg

Re: [ansible-project] Re: VMware VM creation works but on boot the network adapter is disconnected

2022-06-13 Thread Chris Bachmeyer
ot;ipv4": null, >> >> "ipv6": "fe80::7990:4f2e:dfba:fcf5", >> On Tuesday, June 7, 2022 at 7:58:30 AM UTC-6 Christopher Bachmeyer wrote: >> >>> Hi, Norm, >>> >>> My apologies for not seeing this post earlier. No updates

Re: [ansible-project] Failed to import the required Python library (python-ldap)

2022-02-03 Thread Chris Dev
Hello i have the same problem, if i want to start an inventory job (via Dashboard) i get this message: "ansible-inventory 2.8.5 config file = /etc/ansible/ansible.cfg configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python

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

2021-12-09 Thread Chris Jefferies
tname == 'icinga.example.com'}}" to the other tasks. Small price to pay. Thank you. On Thursday, December 9, 2021 at 1:12:39 AM UTC-8 ra...@linuxia.de wrote: > On 09/12/2021 10:07, Chris Jefferies wrote: > > Racke, > > *ansible_play_hosts* - I did not know about this *magic* variable,

[ansible-project] Iterate host definitions into single file

2021-12-08 Thread Chris Jefferies
but abandoned those attempts. Any tips and tricks appreciated. 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 an email to ansible-project+unsubscr...@google

Re: [ansible-project] with_items -- only part of the group in my inventory

2021-12-04 Thread Chris Smart
On Sat, 4 Dec 2021 at 19:42, dudu.c...@gmail.com wrote: > Hi, > > I have a task based on shell command that need to run on local computer. > As part of the command I need to add the IP address of part of the groups I > have in my inventory file > If you have an inventory and the SSH key is on

Re: [ansible-project] Re: Accessing contents of a fact in a loop

2021-12-03 Thread Chris Smart
On Sat, 4 Dec 2021 at 09:08, Todd Lewis wrote: > I don't see where you're setting uid, the debug step, or its output. All I > see is that > >loop: > - "{{ uid }}" > > is only producing one invocation of the task with the desired values all > glommed into one string. > Please show your

Re: [ansible-project] Deploy an exe file to a list of servers

2021-12-03 Thread Chris Smart
On Sat, 4 Dec 2021 at 04:12, Nitrous wrote: > I am new to ansible, and this is what I tried to run it on 1 server: > > The above works for 1 server.. not sure how I can use the above for > multiple servers. > You probably need to create an inventory (

Re: [ansible-project] WIN_DNS_Record

2021-10-04 Thread 'Chris Nicel' via Ansible Project
troubleshoot the issue (or indeed if a newer version will also work) Cheers Chris On Monday, 4 October 2021 at 14:18:00 UTC+1 Chris Nicel wrote: > I should add that we've been using this in various playbooks for a while > now. It mysteriously stopped working some time between the 9th of

Re: [ansible-project] WIN_DNS_Record

2021-10-04 Thread 'Chris Nicel' via Ansible Project
Chris On Monday, 4 October 2021 at 14:15:55 UTC+1 Chris Nicel wrote: > Howdy, > > I am also seeing this issue. > > chris:~/git/ansible$ ansible -m community.windows.win_dns_record -a > "type=CNAME computer_name='dc1.example.local' name=myapp zone=' > internal.example.co

Re: [ansible-project] WIN_DNS_Record

2021-10-04 Thread 'Chris Nicel' via Ansible Project
Howdy, I am also seeing this issue. chris:~/git/ansible$ ansible -m community.windows.win_dns_record -a "type=CNAME computer_name='dc1.example.local' name=myapp zone='internal.example.co.uk' ttl=60 value='docker1.example.local'" -i inventory/test.yml admgmthost -vvv ansible [c

Re: [ansible-project] How to connect ansible on Linux to Windows server using Windows Management Instrumentation (WMI)

2021-09-30 Thread Chris Gallagher
Look into using SSH or (yuck) PSRP On Thursday, September 16, 2021 at 5:53:36 PM UTC-4 weiye...@gmail.com wrote: > What is their reasoning for that policy > > Get Outlook for iOS > -- > *From:* ansible...@googlegroups.com on > behalf of

Re: [ansible-project] Re: How to backup Cisco devices ?

2021-09-30 Thread Chris Gallagher
Check out this implementation of the above module: https://github.com/ciscops/ansible-network-backup On Monday, September 27, 2021 at 3:04:31 AM UTC-4 nilashis...@gmail.com wrote: > Hello Ibrahim, > > You can use the respective config modules to take a full backup of > running-config. Please

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

Re: [ansible-project] Ansible writing to a file

2021-03-09 Thread 'Chris Bidwell' via Ansible Project
Mar 4, 2021 at 4:47 AM 'Chris Bidwell - NOAA Federal' via Ansible > Project wrote: > >> 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 >>

[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
2” > > Try this > > - name: update file >lineinfile: > path: "{{ item.0 }}" > regexp: "{{ item.1.from }}" > line: "{{ item.1.replace_with }}" >with_nested: > - - “/opt/file1” > - “/opt/file2” >

[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] host_pinned strategy not working as expected?

2020-11-11 Thread Chris Ruscio
I have a playbook with a couple dozen tasks. It runs against 3000 Windows Server targets with 1000 forks and `strategy: host_pinned`. It takes about two hours to run to completion when 90% of servers have no changes to be made. Had an idea to speed it up: Write a pre_task that runs a

[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: Ansible playbook to automatically create VMware snapshots

2020-08-19 Thread Chris Alliey
need more specific assistance, let us know. Chris On Tuesday, August 18, 2020 at 6:40:54 PM UTC-4 quad...@gmail.com wrote: > G'day, > > Could someone please point me in the direction of automated creation of > vmware snapshots? > > Scenario: > > 1. Plan to update a seri

[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: "{{

[ansible-project] add_host/group_by how to do sub-groups

2020-07-08 Thread Chris Kiick
Hi, I'm exploring the use of add_host instead of a rather convoluted dynamic inventory setup. I can create the groups for each host, either by specifying groups in add_host, or using group_by. However, these only create flat, first-level groups. Now I need to have a group hierarchy (group of

Re: [ansible-project] Gathering Facts hangs when using become

2020-01-15 Thread Chris Thro
Thank you for the print idea. I was able to trace it to the following commands: /usr/bin/facter --puppet –json Looks like the version of facter doesn't like the --puppet option. WIll probably have to look into uprading it. Thanks again. -- You received this message because you are

Re: [ansible-project] Gathering Facts hangs when using become

2020-01-14 Thread Chris Thro
Thank you. I did the strace and it shows that it is just repeating the same two lines over and over again. select(7, [4 6], [], [4 6], {1, 0}) = 0 (Timeout) wait4(29548, 0x7fff6a145c84, WNOHANG, NULL) = 0 When I checked the details of the select I get the following: lsof -p 10984 -ad 4,6

[ansible-project] Gathering Facts hangs when using become

2020-01-13 Thread Chris Thro
Out of hundreds of hosts we have one host always hangs when gathering facts when using become. Create a playbook with the following: - hosts: all call the playbook with the -b flag The last thing reported in the log is "Escalation succeeded". No matter how long I wait it never returns the

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] Re: How to use enable password with ansible

2019-11-06 Thread Chris Chapman
user: "{{ password }}" prompts: - "[>#]" command: - "enable\n{{ enable_password }}" - terminal length 0 - show running-config [1]: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/tel

[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] how to get a value defined in prior task

2019-07-17 Thread Chris Jefferies
for the final task to update all the passwords with a user: task and with_items. Any tips appreciated, Chris - name: "import hostname to group" shell: "/usr/local/bin/lpass import" args: stdin: "{{ lpass_fields }}\n{{ lpass_group }},{{ inventory_hostname }},{{ inv

[ansible-project] Re: "msg": "basic: the specified credentials were rejected by the server" - Please help

2019-07-12 Thread Chris Jackson
IdleTimeout = 720 MaxConcurrentUsers = 2147483647 MaxShellRunTime = 2147483647 MaxProcessesPerShell = 2147483647 MaxMemoryPerShellMB = 2147483647 MaxShellsPerUser = 2147483647 Chris On Thursday, July 11, 2019 at 9:55:22 PM UTC+1, Jordan Borean wrote

[ansible-project] Re: "msg": "basic: the specified credentials were rejected by the server" - Please help

2019-07-11 Thread Chris Jackson
That's great! I'll try this tomorrow and let you know how I get on. -- 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

[ansible-project] Re: "msg": "basic: the specified credentials were rejected by the server" - Please help

2019-07-11 Thread Chris Jackson
Jordan, Many thanks for the quick response. I am using the Administrator account on the box so I dont think basic/ntlm is the issue. Not sure where else to go with this Chris -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To u

[ansible-project] "msg": "basic: the specified credentials were rejected by the server" - Please help

2019-07-11 Thread Chris Jackson
0xC064 The password is correctly stored in the AWX credential. I'm at a loss as to the problem Any pointers will be greatly appreciated as i have googled this to death Kind Regards Chris. -- You received this message because you are subscribed to the Google Groups "Ansible P

[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 fro

[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] Galaxy 3.2 release scheduled for Monday, 3 June

2019-05-29 Thread Chris Houseknecht
ssues/new/choose> at the Galaxy project <https://github.com/ansible/galaxy/>. Thanks! Chris Houseknecht Galaxy Team Manager chousekn -at- redhat.com -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this gro

[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 unsubs

[ansible-project] how to prevent Ansible to change ansible_python_interpreter after execution

2019-03-18 Thread Chris Duong
Hi, I'm using Zsh and PyEnv. I Pip install the Ansible I had set ansible_python_interpreter to my own PYTHON, in the Inventory file. ```yaml [default] localhost ansible_python_interpreter=/Users/cduong/.pyenv/shims/python ``` However, after the execution, Ansible updated it to default Python

Re: [ansible-project] retrieving facter_ec2_metadata from hostvars - can't get element in macs

2019-03-12 Thread Chris Jefferies
That worked, Kai. Thank you. On Monday, March 11, 2019 at 7:29:02 AM UTC-7, Kai Stian Olstad wrote: > > On 09.03.2019 02:47, Chris Jefferies wrote: > > That's too bad because I don't have the mac address before I need to > read > > its attributes. How might a person

Re: [ansible-project] retrieving facter_ec2_metadata from hostvars - can't get element in macs

2019-03-11 Thread Chris Jefferies
That's too bad because I don't have the mac address before I need to read its attributes. How might a person get a list of the mac addresses associated with the interfaces? Thanks for the info. Chris. On Thursday, March 7, 2019 at 9:19:11 AM UTC-8, Kai Stian Olstad wrote: > > On 05.03.2

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] Re: retrieving facter_ec2_metadata from hostvars - can't get element in macs

2019-03-05 Thread Chris Jefferies
/ansible python version = 2.7.10 (default, Aug 17 2018, 17:41:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] On Tuesday, March 5, 2019 at 12:40:52 PM UTC-8, Chris Jefferies wrote: > > I can drill down into hostvars like this: > > - debug: > msg: "

[ansible-project] retrieving facter_ec2_metadata from hostvars - can't get element in macs

2019-03-05 Thread Chris Jefferies
ac address with the [0] approach like this: {{ hostvars[inventory_hostname].facter_ec2_metadata.network.interfaces.macs[ 0] }} or {{ hostvars[inventory_hostname].facter_ec2_metadata.network.interfaces.macs. 0 }} What's the trick to get to the values within the mac address? Any tips wou

[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

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

2019-01-29 Thread 'Chris Bidwell' via Ansible Project
Using the latest of 2.7. On January 28, 2019 4:06:55 PM MST, Jonathan Lozada De La Matta wrote: >what version of ansible are you using? > >On Mon, Jan 28, 2019 at 6:02 PM 'Chris Bidwell - NOAA Federal' via >Ansible >Project wrote: > >> Hey all, >> >&g

[ansible-project] Running yum updates with ansible

2019-01-28 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
the newest and reinstall it again. I also often wind up with transactions that haven't been completed.Has anyone experienced this before? Thanks! Chris -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this grou

[ansible-project] Adding rhn channels via ansible

2018-12-19 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
auth is not defined (function = login)).\\n\">\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} I'm pretty sure it's got something to do with the: url: http://server.name.com/XMLRPC piece. How do I know what that URL is rea

[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] Re: Custom Windows Module Failing with Ansible 2.6.4 when using become

2018-10-30 Thread Chris Hall
Thanks for the information Jordan. I'll give that a try soon, i've worked around the issue by running the playbook as the user in question but that's not the best solution in my mind. On Monday, 29 October 2018 21:14:56 UTC, Jordan Borean wrote: > > Thanks for that, the user seems to have the

Re: [ansible-project] Re: Custom Windows Module Failing with Ansible 2.6.4 when using become

2018-10-29 Thread Chris Hall
This is with become: "account": { "account_name": "svcservicefabric", "domain_name": "MY", "sid": "S-1-5-21-4077456329-152936645-47294291-6160", "type": "User" }, "authentication_package": "Kerberos", "changed": false, "dns_domain_name":

Re: [ansible-project] Re: Custom Windows Module Failing with Ansible 2.6.4 when using become

2018-10-29 Thread Chris Hall
Hi Jordan, The servicefabric_cluster is a powershell module. -- 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 ansible-project+unsubscr...@googlegroups.com. To

Re: [ansible-project] Re: Custom Windows Module Failing with Ansible 2.6.4 when using become

2018-10-29 Thread Chris Hall
Hi Jordan, This is how i'm calling my module: - hosts: management gather_facts: false run_once: true vars: ansible_become_user: "{{ servicefabric_details['sf_serv_account'] }}@{{ datacenter_domain }}" ansible_become_password: "{{ service_fabric_password['password'] }}" sf_base_dir: "{{

Re: [ansible-project] Module Failure when trying to create the instance when provisining and insatll software at launch time.

2018-10-27 Thread Chris Hall
Looks like your playbook is running against localhost only.so when it gets to the Windows portion it's trying to run powershell on the Linux host,hence the powershell error. You need to either delegate_to the Windows host group or use the Windows host group as a separate hosts block wrapping the

[ansible-project] Custom Windows Module Failing with Ansible 2.6.4 when using become

2018-10-26 Thread Chris Hall
? Everything was working fine with 2.4 so i rule out permissions issues (unless the ansible become has changed to require something extra; but it works with other modules) Any suggestions what I should take a look at? Thanks Chris -- You received this message because you are subscribed to th

Re: [ansible-project] Ansible 2.6.6 is available

2018-10-19 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
gid/ansible-project/5bac919a-144b-4a50-bfe5-6978539b36f8%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Chris Bidwell, CISSP Space Weather Prediction Center National Oceanic Atmospheric Administration email: c

[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
his at the end. Any ideas? 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 an email to ansible-project+unsubscr...@googlegroups.com. To

[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] Error with jinja2 templating for a conditional

2018-09-18 Thread Chris
Hello, Will someone please help me understand why this is not work? Thanks! --- - hosts: all become: yes become_method: sudo become_user: root vars: stat_files: - name: stat_var stat_path: "/etc/resolv.conf" tasks: - name: "Verify file copy destination"

[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] restart service for a single computer using a loop when file copied

2018-09-05 Thread Chris
Thank you, this is the answer I was searching for with my question. I will add a notify key and then use a handler off of the key. On Wednesday, September 5, 2018 at 1:32:11 PM UTC-7, Kai Stian Olstad wrote: > > On 05.09.2018 22:12, Chris wrote: > > Apologies if that w

Re: [ansible-project] restart service for a single computer using a loop when file copied

2018-09-05 Thread Chris
is copied. Additionally I don't want to restart the syslog service on all of the inventoried servers just the ones with the updated file. I hope that makes my question more clear. Chris On Wednesday, September 5, 2018 at 12:48:54 PM UTC-7, Kai Stian Olstad wrote: > > On 05.09.2018 20:23,

[ansible-project] restart service for a single computer using a loop when file copied

2018-09-05 Thread Chris
e }}" with_items: - "{{ copy_files }}" If the system copies a new syslog file restart syslog. I know there are handlers and notify, but I only want to restart on a specific system if it gets updated. Chris -- You received this message because you are subscribed to the Google

[ansible-project] Re: Ansible 2.5.1 does not run a task

2018-08-24 Thread Chris Barlock
Well, I rebuilt my Ansible tool and now it behaves properly. -- 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 ansible-project+unsubscr...@googlegroups.com. To

[ansible-project] Re: Ansible 2.5.1 does not run a task

2018-08-23 Thread Chris Barlock
y SSH key" copy: src: ~/.ssh/id_rsa dest: "{{ icp_dir }}/cluster/ssh_key" - name: "Write hosts file" copy: src: "{{ inventory_file }}" dest: "{{ icp_dir }}/cluster/hosts" On Thursday, August 23, 2018 at 8:36:09 PM UTC-4, C

[ansible-project] Ansible 2.5.1 does not run a task

2018-08-23 Thread Chris Barlock
I just upgraded a set of Ubuntu machines from 16.04.5 to 18.04.1, which now has Ansible 2.5.1 installed. An existing Ansible project that I have seems to skip a step. With verbose mode enabled, I see that it starts the step: PLAY [master]

  1   2   3   4   >