[ansible-project] pip installs old version of ansible-core (2.12) & ansible-galaxy install is broken OOB

2023-01-09 Thread Dan Van Atta
Following up to: https://github.com/ansible/ansible/issues/79697 Is there any plan to update the version of ansible installed by pip? The priority of that I think should be elevated. 2.12 is the current version that is installed via `pip install ansible-core` using python3, which currently

[ansible-project] Re: Encrypted SSH Key leads to Invalid format

2022-10-02 Thread Dan Linder
Can you provide a minimal Ansible playbook with a vaulted variable file to see if we can recreate it or see anything amiss? The error message you're showing states "root @ SOME_IP: Permission denied (publickey,password)" which doesn't seem to be ansible-vault related. On Sunday, October 2,

[ansible-project] Re: Run playbook against multiple hosts with different variables

2022-03-04 Thread Dan Linder
Do you have an inventory file setup that has "server01" and "server02" setup in group(s)? For instance, instead of running the two examples above, setup an inventory file with both servers listed: # inventory.ini server01 server02 Then run your playbook like this: ansible-playbook

Re: [ansible-project] The "mount' module and adding a mount option

2022-01-20 Thread Dan Linder
or will this end up being a playbook that *only* I can support at 3AM... :-/ Dan On Tuesday, January 18, 2022 at 6:20:04 AM UTC-6 dick@geant.org wrote: > You don't have to split the opts by comma, just checking if 'nodev' is > enough. > If it isn't there, you can then append it: >

[ansible-project] The "mount' module and adding a mount option

2022-01-17 Thread Dan Linder
I've got a variety of mounts that I want to ensure specific flags are set on each. For other reasons, the mounts don't have the same flags. I mistakenly thought the 'mount' module would ensure each had the flag, but instead it set the flags of the mount to ONLY the 'opts' parameter. For

[ansible-project] Re: Ansible and SELinux Issues

2021-12-09 Thread Dan Linder
at Ansible connected as. Dan On Monday, December 6, 2021 at 8:59:26 AM UTC-6 Ryan P wrote: > Hi all, > > My Ansible server has lost the ability to login to any of my hosts (itself > included) and I am hoping others have had a similar issue. > > The server in question is a R

Re: [ansible-project] Stouck in Ansible

2021-07-19 Thread Dan Linder
Abdul, If you're stuck as to how to ask the question, the StackOverflow "How do I ask a good question?" is a good reference. https://stackoverflow.com/help/how-to-ask Dan On Monday, July 19, 2021 at 2:51:02 AM UTC-5 dick@geant.org wrote: > This is almost zero informatio

[ansible-project] Re: Warning in ansible-base 2.10 (when running playbook)

2020-12-14 Thread Dan Michael O . Heggø
omatically at the moment, due to the way the dependencies are declared. I just submitted an issue about that: https://github.com/ansible/ansible/issues/72967 As a workaround, you have to add it manually: poetry add packaging Dan Michael On Thursday, November 19, 2020 at 12:49:45 PM UTC+1 aixt...

Re: [ansible-project] Stripping YAML dashes from output

2020-11-13 Thread Dan Linder
> Ultimately I'd like to figure out how to add a semicolon after each entry, This should do that; join with a semicolon not a newline: | join('; ') > then separate them into batches of 500 emails each Since you have the list already, you could use a `for` loop with an `if` test to insert a

Re: [ansible-project] Is it possible to SKIP task programmatically? Using callback module?

2020-11-02 Thread Dan Linder
What I've done for cases like this is use "when:" blocks on an include to pull in (or not) additional tasks. >From the 'include:' module : ``` - name: Include task list in play only if the condition is

Re: [ansible-project] Advice on build Immutable VM's ( VMware )

2020-10-28 Thread Dan Linder
On Tuesday, October 27, 2020 at 2:41:06 AM UTC-5 SP wrote: > An immutable vm in which servers are never modified after they’re > deployed. If something needs to be updated, fixed, or modified in any way, > new servers built from a common image with the appropriate changes are > provisioned to

Re: [ansible-project] Advice on build Immutable VM's ( VMware )

2020-10-26 Thread Dan Linder
I'll second @abhijeet and the use of the "vmware_guest" and "vmware_guest_sendkey" modules. It permits you to completely build your templates from a known ISO from your vendor (validated with a SHA256 checksum), using a kickstart file of your own, and no human interaction. And if the

Re: [ansible-project] Ansible tower issue

2020-10-11 Thread Dan Linder
I'm not trying to be snarky, but if you are truly "able to do it in the ansible cli with same user" then you wouldn't be receiving the error "rsync: change_dir \\"/opt/tibco/image\\" failed: Permission denied (13)" If this is as urgent as your messages are implying, you need to try some of the

Re: [ansible-project] deprecation of DEFAULT_HASH_BEHAVIOUR option

2020-09-27 Thread Dan Linder
I'll second ND that the hash_behavior option of "merge" is more usable in my situation - I have hashes of information that get built up in the playbook (one piece sets defaults for a location (i.e. "North America" vs "Europe" vs "Asia"), then a later part sets defaults for different

Re: [ansible-project] unistall windows server

2020-09-23 Thread Dan Linder
ove vm from dns >> >> On Wed 23 Sep, 2020, 9:32 AM Gajendra Gaikwad, < >> gajendra.y.gaik...@gmail.com> wrote: >> >>> Yes as Dan said, make a list what's is the current process >>> >>> For example >>> >>> 1. Playbook 1 - keep serve

Re: [ansible-project] unistall windows server

2020-09-22 Thread Dan Linder
When I get to a point where I'm asking "How do I do X in Ansible", my first step is to make a checklist of what I would do if I was doing it manually. Assuming when you ask "Windows server uninstallation" you mean to remove the host from AD, remove it from DNS, delete files, etc., then start

Re: [ansible-project] Re: remove mysql

2020-07-16 Thread Dan Linder
The actions that those two tasks perform look to be the same, but you should update the "name:" field to better reflect that the job is removing/un-installing those packages. On Thursday, July 16, 2020 at 8:58:44 AM UTC-5 tdub...@gmail.com wrote: > control server is ubuntu 19.10 > client is

[ansible-project] Re: remove mysql

2020-07-15 Thread Dan Linder
> I tried this pb but its not uninstalling Can you be more specific? What version of Ansible are you using, what version of Debian/Ubuntu is the server you're working on? What is the output of this command when you run it on the machine you're wanting to remove the packages from: apt

Re: [ansible-project] Re: authorized_keys module is deleting too many line when using state: absent

2020-05-28 Thread Dan Idar
I ran some tests created on vagrant some ssh files and created a authorized_keys with duplicates and tried to add/remove a line that is not a duplicate the result is that if there is a line to be added/removed from the authorized_keys files the duplicates are also removed if there are no

[ansible-project] how to execute a handler if a file is found

2020-05-19 Thread Dan Idar
Hello I would like to be able to find the files that are bigger than a certain dize and then restart a service if this happens because it mean the rotation is not working after the configurtion update the find module does not 'change' when the file is found or not and i know i can trigger a

[ansible-project] Re: Create folder using command line

2020-05-18 Thread Dan Idar
Do not use shell when you have native modules ansible can create whole trees using the file module example: --- - hosts: localhost tasks: - name: create dir structure file: path: 'ibm/{{ item }}' state: directory with_items: - it - logisitic

Re: [ansible-project] run_once not working to register value of curl

2020-04-15 Thread Dan Linder
ril 15, 2020 at 2:43:51 AM UTC-5, Nicola Contu wrote: > > I am sorry Dan, > I think I did not understand what you want to debug. > This playbook does not work and I can't make it working. > > Sorry about that. > > Btw, the issue is that the variable is not available betwee

Re: [ansible-project] run_once not working to register value of curl

2020-04-10 Thread Dan Linder
-7.2.29.tar.gz", > "name": "PHP 7.2.29 (tar.gz)", > "sha256": > "ea5c96309394a03a38828cc182058be0c09dde1f00f35809622c2d05c50ee890" > }, > { > "date": "19 Mar 2020", > "filename": "php-7.2.29.ta

Re: [ansible-project] run_once not working to register value of curl

2020-04-10 Thread Dan Linder
Hi Nicola, I'd take a bit step back and reduce your playbook to just a couple of tasks: ``` - hosts: "{{ variable_host }}" serial: 1 tasks: - name: "Get PHP version from site" register: PHP_SITE_RESPONSE uri: body_format: json method: GET

Re: [ansible-project] Unable to get correct disk space utilized percentage using Ansible API

2020-03-25 Thread Dan Linder
I'd suggest putting a debug showing you the three numbers Ansible is using for item.size_total and item.size_available. As @klingac mentioned, it could be that the values that ""df -k" reports or uses in it's computation aren't the exact same ones that Ansible uses. For instance, using the

Re: [ansible-project] Ansible password_hash issue

2020-03-10 Thread Dan Linder
What is the error and what is sending the error? (i.e. is the error from "psql" or from Ansible itself?) Can you run the playbook with "-vvv" and paste in the errors the "Reset Admin pw" step produces. On Tuesday, March 10, 2020 at 11:12:17 AM UTC-5, Bala Mutyam wrote: > > Hi, > > Thanks for

[ansible-project] Re: Windows updates found but not installed

2020-02-29 Thread Dan Linder
I'd suggest removing the category_names and server_selection fields and see if the missing patches are applied. I don't do Windows patching, but it might be that the "sql server sp2 gdr" is in a different category or server selection. The "category_names" looks like it is a dynamic list that

[ansible-project] Re: Building a VM using Ansible Tower

2020-02-23 Thread Dan Linder
> I'm not sure if there is a difference in vmware_guest module for Tower or with versions. If the output is the same between Ansible Engine and Ansible Tower, then that would be my first though. Check the versions Tower and your test system are using and make sure Tower is the same version.

[ansible-project] Re: Windows updates found but not installed

2020-02-23 Thread Dan Linder
Can you include a simplified playbook showing the steps you're performing? Were the systems pending a reboot from a previous update? On Saturday, February 22, 2020 at 8:38:35 AM UTC-6, Andre Gronwald wrote: > > hi, > i tried to update some sql-servers with ansible (awx). > overall it worked

[ansible-project] Unable to connect to Windows 2016 over HTTPS using self signed certificates; using ansible securely in a mixed active directory environment

2020-01-24 Thread Dan Hebert
Good afternoon, I have been trying to get ansible working over a Windows 2016 HTTPS listener with encryption using TLS encryption and self-signed certificate authentication. User authentication over HTTP is not going to be sufficient. The environment where I work is a mix of nodes

[ansible-project] Re: root user password needs to set for many servers however the password should be different password, not to be same

2019-09-18 Thread Dan Linder
Great to hear! Thanks for the feedback. On Wednesday, September 18, 2019 at 11:18:03 AM UTC-5, Deepan M wrote: > > Thank you Dan Linder, playbook is working perfect. > > Regards, > Deepan M > > On Tuesday, September 17, 2019 at 10:06:25 PM UTC+5:30, Deepan M wrote: >>

[ansible-project] Re: root user password needs to set for many servers however the password should be different password, not to be same

2019-09-17 Thread Dan Linder
If you're ok with Ansible generating the password for you then storing it on the machine you ran the playbook from, then the `password` plugin might help a bit. Assuming you have an inventory of servers and you're OK with saving the latest password to "/tmp/root.password.hostname.txt", I

Re: [ansible-project] Re: Thoughts on Dynamic Variables

2019-09-03 Thread Dan Linder
Dang! @Karl Auer beat me to this example. :) Depending on your needs and comfort level, here are two examples with sample output. The first "userlistA" is closer to your original example and has each list with a name that is not consistent with the server_type variable. That leads to the

[ansible-project] Re: Thoughts on Dynamic Variables

2019-08-30 Thread Dan Linder
A lot of our builds have site or subnet specific differences so we use Ansible facts to include specific YML files for either additional variables or branching the execution. For example, to choose the proper method to install VMware tools on our systems (RHEL 6 vs 7, and internet access or

[ansible-project] Re: best way to test for a condition and report it

2019-08-14 Thread Dan Linder
ork port speeds: 10Mbit, 100Mbit, 1Gbit, 10Gbit), but still do-able with the external script. Dan On Tuesday, August 13, 2019 at 8:39:55 AM UTC-5, Ed Greenberg wrote: > > Hi, I have an ansible module that adds and removes servers from the load > balancer. If I do: > > ansibl

[ansible-project] Re: set, read, and use vars from csv or csv2yml file

2019-08-04 Thread Dan Linder
What is the exact error message you're getting? I only slightly agree with Mr. Fellers response ("create a custom vars plugin"), but in your case that might be overkill. I've seen teams that have a developer write some custom code that breaks soon after he/she leaves and then they are stuck

Re: [ansible-project] using different remote_user until success

2019-07-09 Thread Dan Linder
it > might be useful? > I think so, yes. Dan -- 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

Re: [ansible-project] using different remote_user until success

2019-07-08 Thread Dan Linder
Are you opposed to using a second playbook and using the "include:" module like this? --- - hosts: all gather_facts: false tasks: - name: try users #remote_user: "{{ item }}" include: include-3.yml vars: my_remote_user: "{{ item }}" with_items: - centos -

[ansible-project] Re: Ansible usage of puppet "facter" not working in some hosts

2019-06-17 Thread Dan Linder
Since you have at least one working and one failing machine (presumably of the same OS version), can you compare the "rpm -qa" output and see what's different between the two just in case it's a simple package that was missing? On Sunday, June 16, 2019 at 2:10:04 PM UTC-5, Thomas Spear wrote:

[ansible-project] Merging of "win_*" with their non-OS specific siblings?

2019-05-28 Thread Dan Linder
Are there plans to merge the various Windows specific modules into their non-OS specific module twins? I'm thinking more of things like "win_ping", "win_copy", "win_command", "win_file", "win_shell", "win_tempfile", "win_template", "win_uri", "win_user", etc. There are plenty of Windows

[ansible-project] Re: How to use vars to work with to_datetime

2019-05-19 Thread Dan Linder
You're using the "debug:" module to set the "msg" variable so the date value isn't in the "{{ msg }}" variable, rather it's in the "{{ msg.msg }}" variable. Try these lines in stead: - name: FIXED - age of file in days stored in msg set_fact: msg: "{{ (ansible_date_time.epoch|int -

[ansible-project] Re: How to try one task in Ansible ?

2019-05-17 Thread Dan Linder
Your second question: > But when i run my script with module command or script or shell, the state > is changed but i'm not rassure if all task in my script is execut ...? When you use the `script:` module, anything that script does on your remote system is outside of the control of Ansible.

[ansible-project] Re: Delete based on directory size

2019-05-11 Thread Dan Linder
Does this help? I created a directory structure with four files: $ find /tmp/dirsize/ -ls | cut -c 18- drwxrwxr-x 5 dan dan 100 May 11 14:59 /tmp/dirsize/ drwxrwxr-x 2 dan dan60 May 11 15:00 /tmp/dirsize/d3 -rw-rw-r-- 1 dan dan 5242880 May 11 15

[ansible-project] Re:

2019-05-05 Thread dan
To see the hostname or use it in your playbook, you use the ansible_hostname or ansible_fqdn variables. As Jonathan Cha'gara Lozada De La Matta mentioned, the hostname module can set it, but many applications still (incorrectly) rely on it also being in the /etc/hosts file. Here's what I've

[ansible-project] How to use vars to work with to_datetime

2019-05-01 Thread dan
It's hard without the actual playbook, but I think you need to use 'current.stdout' inserted of just 'current' in that last task. -- 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

[ansible-project] Re: awx/tower api help wanted

2019-04-27 Thread dan
BTW, I've done quite a bit of API work on the command line using curl and this site is quite useful: https://json.parser.online.fr/ I was able to paste in your original code and easily see that "targets" is only going to be evaluated once (to "dev-cn-c2") by looking at the YAML. Or if you

[ansible-project] Re: awx/tower api help wanted

2019-04-27 Thread dan
I believe your JSON on the command line is incorrect - I'd bet that your example only runs against the "dev-cn-c2" target, correct? Try this for the data to pass: { "extra_vars": { "domain": "dom-cn-1", "targets": [ "dev-cn-c1", "dev-cn-c2" ] , "fwcmd": "fw sam -v -J src 192.168.10.10" }}

Re: [ansible-project] win_copy azure ansible module not working

2019-04-22 Thread dan
You could upload all these files (playbook, inventory, sample file to copy, etc) to a temporary GitHub.com or GitLab.com repository for us to look at it. The "unable to parse inventory" probably means formatting or other weirdness, not a bug or problem with Ansible. On Monday, April 22, 2019

Re: [ansible-project] win_copy azure ansible module not working

2019-04-18 Thread dan
On Thursday, April 18, 2019 at 4:19:15 AM UTC, gottumukkala srija wrote: > > [WARNING]: Unable to parse /home/f2/.ansible/inventory as an inventory > source > > [WARNING]: No inventory was parsed, only implicit localhost is available > > [WARNING]: provided hosts list is empty, only localhost

Re: [ansible-project] win_copy azure ansible module not working

2019-04-17 Thread dan
I don't do much Ansible work on Windows systems, but the message "Failed to connect to host via ssh" seems to imply that the connection type for that remote host isn't setup for Windows. At minimum you'll need to setup these connection variables (connection type, user, and password) as shown

Re: [ansible-project] win_copy azure ansible module not working

2019-04-15 Thread dan
Please clarify a couple questions: 1. You're running the ansible command from a Linux (RedHat, Ubuntu, CentOS, Debian) system, correct? 2. The playbook you're using has these tasks: - name: Copy script from local to remote server win_copy: src: files dest: C:\

[ansible-project] Re: New User First Issue discrepancy between ansible & tower

2019-04-13 Thread dan
Really looks like your credentials in Tower aren't properly setup properly. Double check that the ssh key or userid/password you're using in Tower are valid and work with the 10.244.193.34 system. If that fails, run the play with verbosity set to 3 or 4, and get onto the remote system to

[ansible-project] Re: Ansible, CyberArk, root and SSH

2019-02-24 Thread dan
*Disclaimer:* I've never used the CyberArk suite so I'm not aware of all options it might have. Other tools I have used had their own replacement for "ssh" that had to be used and provided a similar experience. (But that was in a pre-Ansible world about 15 years ago so...) Your question

Re: [ansible-project] Ansible Failed Authentication

2019-02-24 Thread dan
ble.com/ansible/latest/user_guide/intro_getting_started.html#your-first-commands ). Dan -- 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-proj

[ansible-project] Re: Ansible Dynamic Inventory for Azure

2019-02-24 Thread dan
) doesn't match a supported version* ...but I don't have a solution since that is more dependent on the system you ran the commands on. Dan On Sunday, February 24, 2019 at 1:29:26 AM UTC-6, ameya agashe wrote: > > Hi Guys, > > I am trying to play around with Ansible dynamic inve

Re: [ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread Dan Linder
Correction to my previous email: You *COULD* run a play right before it that registers the full path of `systemctl` found on the system (maybe use `shell: which systemctl`), but that is not a stable method in some cases. I suggest using `systemd:` with the OS version check if needed. On Fri,

[ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread dan
I'd suggest not using the `shell:` module, instead use the `systemd:` module. Then setup the `when:` clause with a third that only executes this play on OS versions that have `systemctl` (e.g. RHEL 7+, etc). You run a play right before it that registers the full path of `systemctl` found on

[ansible-project] Re: Including vars_files based on a condition is getting failed

2018-11-11 Thread dan
You will need to place quotation marks around the value you're comparing to if it is a string. This is what worked for me: - include_vars: /etc/ansible/anusha/hr/vars/main.yml when: components == "xyz" On Saturday, November 10, 2018 at 11:00:03 PM UTC-6, anushake...@gmail.com

[ansible-project] Re: Including vars_files based on a condition is getting failed

2018-11-11 Thread dan
I noticed that you ARE sending the "-e components=xyz" on the command line. Please ignore my other response - Google Groups isn't letting me delete it. On Saturday, November 10, 2018 at 11:00:03 PM UTC-6, anushake...@gmail.com wrote: > > Hi All, > > > I am trying to include vars_Files based

[ansible-project] Re: Including vars_files based on a condition is getting failed

2018-11-11 Thread dan
The error message states that "'components' is undefined", so assuming "components" are conditionally defined earlier, you'll have to put in another "when" clause to validate it is defined. Something like this: pre_tasks: - include_vars: /etc/ansible/anusha/hr/vars/main.yml

Re: [ansible-project] getting error when i set ssh-agent for root user

2018-09-30 Thread Dan Linder
ler*" My gut feeling is that there's something missing that would make your task a lot easier and not need the ssh-agent/ssh-add processes. On Sun, Sep 30, 2018 at 5:47 PM pranay varankar wrote: > Hi Dan, > > Actually we install some of my on-premises software on remote machine but

Re: [ansible-project] getting error when i set ssh-agent for root user

2018-09-30 Thread Dan Linder
The "ssh-agent" and "ssh-add" are usually run on a system as a specific user to add an SSH key to a temporary 'keychain' so any subsequent SSH commands can automatically (and without prompting) use a specific ssh key to connect to a second system. When you run them in the Ansible "shell"

Re: [ansible-project] Re: Source control of playbooks - how do you edit, test and perform version control....

2018-09-19 Thread Dan Linder
heir managers) the ability to adjust the inventory based on business need. ("Select all servers which handle CustomerX and ensure this patch is applied." Or "Configure the ssh service on all systems in the DMZ to only permit logins from the internal management subnet.") On Thu, Aug

[ansible-project] Ansible Galaxy -> william-yeh.oracle-java not found

2018-09-04 Thread 'Dan Alvizu' via Ansible Project
Hi, I am using ansible-galaxy and a requirements.yml file. I have CI set up to do linting. My CI build today - it last successfully ran 6 days ago. I think the group name of my dependencies changed, but now I can't get them to work: My requirements.yml looks like this: - src:

[ansible-project] How to setup variable files to contain multiple versions of vaulted variables

2018-08-20 Thread Dan Linder
I'm running Ansible 2.6.2 and trying to wrap my head around the --vault-id and multiple vault passwords . As I understand it, the usefulness it is bringing is that different users can have

Re: [ansible-project] trying to reset root password by using .yml playbook, but its failed with permission denied error, however same .yml playbook is working via terminal.

2018-08-02 Thread Dan Linder
To save the call to the external Python command to encrypt the password, you can use the Jinja2 "password_hash" documented here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hashing-filters So your example could look like this: - name: changing root

Re: [ansible-project] Re: Multiple conditions not working

2018-05-27 Thread Dan Linder
I've run into subtle and hard-to-spot logic bugs (Ansible and elsewhere) that were 'correct' but magically solved when rewritten. I agree that your syntax looks spot on, but breaking it out into multiple statements might make it easier to troubleshoot later on too. Glad it worked! On Sun, May

[ansible-project] Re: Multiple conditions not working

2018-05-27 Thread Dan Linder
ignore_errors: yes On Sunday, May 27, 2018 at 12:00:17 PM UTC-5, Dan Linder wrote: > > The "when" stanza performs a AND when there are multiple when conditions ( > http://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#the-when-statement > ). > >

[ansible-project] Re: Multiple conditions not working

2018-05-27 Thread Dan Linder
The "when" stanza performs a AND when there are multiple when conditions (http://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#the-when-statement). Whenever I encounter a problem with 'when' I try to break it up to multiple lines so the numerous parenthesis aren't

[ansible-project] Re: command module with squiggly braces not working.

2017-11-02 Thread Dan
{"IpProtocol": "tcp", "FromPort": 443, "ToPort": 443, "PrefixListIds": > [{"PrefixListId": "pl-63a5400a"}]}]' On Thursday, November 2, 2017 at 2:29:18 PM UTC-4, Dan wrote: > > ec2_group (as of Ansible 2.4) doesn't support usag

[ansible-project] command module with squiggly braces not working.

2017-11-02 Thread Dan
ec2_group (as of Ansible 2.4) doesn't support usage of pl-x (prefix lists) typically employed by VPC endpoints. So I went down the rabbit hole of doing this via a command module. The command works on the prompt. How do I get this to work? ERROR! Syntax Error while loading YAML. The

[ansible-project] Re: Vault and "dictionaries" - bug or feature request?

2017-10-16 Thread Dan Linder
ot;List variable" debug: msg: "name: {{item}}, password: {{item.password}}" with_items: "{{ userlist.values() | list }}" On Wednesday, October 11, 2017 at 9:24:57 PM UTC-5, Dan Linder wrote: > I've have a dictionary variable setup that has accounts and

[ansible-project] Vault and "dictionaries" - bug or feature request?

2017-10-11 Thread Dan Linder
I've have a dictionary variable setup that has accounts and passwords: password_list: - { name: "user1", password: "user1pwd" } - { name: "user2", password: "user2pwd" } - { name: "user3", password: "user3pwd" } This

[ansible-project] Small Example for Reading from CSV-File for the creation of new user

2017-07-26 Thread 'Dan Steffen' via Ansible Project
rk bwillis I already know that I have to declare the "item" Variable so I can iterate through the user.csv but I don't can figured out how, maybe someone here can give me a little how to define the item-Variable I would very thanksful best regards Dan -- You received this message becaus

Re: [ansible-project] Ansible "file" module and attributes in 2.3.1.0

2017-07-23 Thread Dan Linder
Thanks Kai, hadn't thought about using the attr_flags field - I'll give it a shot when I get back to that issue. Dan On Sat, Jul 22, 2017 at 9:34 AM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 21.07.2017 17:34, Dan Linder wrote: > >> I setup a playb

[ansible-project] Ansible "file" module and attributes in 2.3.1.0

2017-07-21 Thread Dan Linder
a +/- is present in the attributes line? That makes it easy to use "-i" to remove immutable, or "+i" to add immutable flag, though I haven't thought through the ramifications and idempotent features... Thanks, Dan -- You received this message because you are subscribed to the G

Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Dan Linder
I'm falling back to the six tasks for now (three stat file, three include when exists). In my mind this is a bug; the "ignore_errors" setting should let it keep the partial result. The parallel being that the file module could partially succeed in setting a file owner but SELinux or other

Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Dan Linder
I forgot to add that I've defined the hash_behaviour to "merge" just for this express purpose of keeping and stacking/appending variables so the normal behavior is suppose to be modified here. On Monday, July 10, 2017 at 2:59:22 PM UTC-5, Brian Coca wrote: > > Well, when you include_vars you

[ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Dan Linder
true, "msg": "Unable to find 'info_localhost.yml' in expected paths."}* *...ignoring* *TASK [debug] *fatal: [localhost]: FAILED! => {"failed": true, "msg": "the field 'args'

[ansible-project] Re: Multiple host files with host vars - what is the precedence?

2017-05-15 Thread Dan Bateman
host files exist. On Friday, 12 May 2017 19:16:20 UTC+1, Dan Bateman wrote: > > I have a setup where I have multiple inventory files in a directory and my > ansible.cfg points to that inventory directory rather than a file. Also > using ec2.py for aws dynamic inventory which is inside t

[ansible-project] Multiple host files with host vars - what is the precedence?

2017-05-12 Thread Dan Bateman
I have a setup where I have multiple inventory files in a directory and my ansible.cfg points to that inventory directory rather than a file. Also using ec2.py for aws dynamic inventory which is inside the inventory directory also. All hosts files, except for one are in a sub directory. All of

[ansible-project] Specifying version when installing Apache

2017-04-06 Thread Dan F
I'm thinking of using specific versions for everything whenever I can. This would enable me to mirror exactly what I have in one server to another at any given time. With that said, I tried a very basic install of Apache and attempted to see what it took to get this configured. I started

[ansible-project] Re: How to read the --limit command line option

2017-03-10 Thread dan
Hi Marco, Not sure you can get the raw limit string, but there is this: {{ ansible_play_hosts }} If you are after list of target hosts for your play, after your limit has been resolved. Thanks - Dan. On Thursday, March 9, 2017 at 8:01:10 AM UTC, Marco Buttu wrote: > > Hi all, I woul

[ansible-project] Experience with very large inventories

2017-03-10 Thread dan
of systems? Thanks - Dan. -- 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 post to this group, send email

[ansible-project] Roles, vars, defaults, and pre_tasks.

2017-03-09 Thread Dan Linder
ansible/roles/sysprep/test.yml': line 10, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: pre_tasks: - debug: ^ here Thoughts? Thanks! Dan -- You received this message because you are subscribed to the Google

[ansible-project] trying to parse a dict to add users: missing something easy...

2017-01-30 Thread Dan Geist
quot; == 'enabled' ^ here We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance: Any ideas? Dan -- You received this message because you are subscribed to t

[ansible-project] Re: Windows bash and Ansible looking for /usr/bin/python on windows client

2017-01-24 Thread Dan W
Jon, Don't think that's it. Did my best to check rights and permissions, it appears that all files can be accessed and variables are being read. See the below output (with some data removed). You can see connecting via winrm, sending powershell script, and then attempting to run powershell

[ansible-project] Windows bash and Ansible looking for /usr/bin/python on windows client

2017-01-23 Thread Dan W
So friday I updated my machine to windows 10, installed bash shell, configured kerberos and was able to perform simple actions such as win_ping, shut down a service, install a chocolatey package. This morning came in and upgraded the bash environment in windows. Now when running any of my

[ansible-project] Using serverspec with ansible

2017-01-01 Thread 'Dan Steffen' via Ansible Project
the usage. best regards Dan -- 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 post to this group, send email

Re: [ansible-project] Re: IAM Roles with Ansible

2016-12-13 Thread Dan
Yep that was it, thanks for the pointer! This throws errors but this is the right direction. --- - name: ANS Dev Security Group Build .v01 hosts: 127.0.0.1 connection: local tasks: - name: Create two new IAM users with API keys iam:

[ansible-project] Re: IAM Roles with Ansible

2016-12-13 Thread Dan
Spacing was changed and I am really at a loss. Python 2.7.12 ansible 2.3.0 Mac If someone can create an example that works, I will be willing to try that, to be able to move forward. Any help? On Tuesday, December 13, 2016 at 8:18:24 AM UTC-5, Dan wrote: > > Ok I ran by using the c

[ansible-project] Re: IAM Roles with Ansible

2016-12-13 Thread Dan
, Jeremy Young wrote: > > Looks like a spacing issue. Your list of tasks needs to be indented two > spaces. > > On Monday, December 12, 2016 at 4:45:06 PM UTC-6, Dan wrote: >> >> # Example of role with custom trust policy for Lambda service >> --- >> task:

[ansible-project] Re: IAM Roles with Ansible

2016-12-13 Thread Dan
just create my roles via AWS cmdline. On Monday, December 12, 2016 at 5:45:06 PM UTC-5, Dan wrote: > > # Example of role with custom trust policy for Lambda service > --- > task: > - name: Assign a policy called Admin to the administrators group > iam_policy: >

[ansible-project] IAM Roles with Ansible

2016-12-12 Thread Dan
# Example of role with custom trust policy for Lambda service --- task: - name: Assign a policy called Admin to the administrators group iam_policy: region: us-east-1 profile: dev iam_type: role iam_name: test policy_name: Admin state: present policy_document:

[ansible-project] Re: Creating Security Groups with EC2_group mod

2016-12-12 Thread Dan
Has anyone found a method around this? On Friday, December 9, 2016 at 5:57:09 PM UTC-5, Dan wrote: > > I've had great success in building out my security groups with this > module, until today. > > The issue is that I cannot code in yaml a destination referencing a > prefi

[ansible-project] Creating Security Groups with EC2_group mod

2016-12-09 Thread Dan
I've had great success in building out my security groups with this module, until today. The issue is that I cannot code in yaml a destination referencing a prefix-list. "pl-XX" Is this supported? Or planned in the future? -- You received this message because you are subscribed to the

[ansible-project] ec2_group not able to et prefix list as destination

2016-12-09 Thread Dan
Is this supported in this release? Are there plans to allow for such in the future? This is the sample of what I have in my yaml file. rules_egress: - proto: tcp from_port: 443 to_port: 443 group_id: pl-XX -- You received this message

[ansible-project] Can somebody help me understand hostvars and jinja's intersect?

2016-11-18 Thread Dan Rough
that is in all three of the groups. However, at the moment both servers are being returned. Have I misinterpreted how the intersect should work, or am I doing it wrong? Are there other ways to achieve what I'm attempting to do here? Thanks! Dan. -- You received this message because you

Re: [ansible-project] Changes to when and conditionals in Ansible 2.2

2016-11-02 Thread Dan Lang
the with_items loop, and not before the with_items. So your > with_items needs to process correctly all the time. As such, you could > remove `when` statement altogether as it isn't doing what you wanted it to > do. > > On Wed, Nov 2, 2016 at 4:37 PM, Dan Lang <dan@gmail.com &g

[ansible-project] Changes to when and conditionals in Ansible 2.2

2016-11-02 Thread Dan Lang
I'm testing existing roles and playbooks against Ansible 2.2, and I've noticed that several roles that I have written that take advantage of "when: variable is defined" or "when: variable is undefined" in tasks no longer work. This happens when a variable is used from a previous task, but is

  1   2   3   4   >