Re: [ansible-project] help debugging calling import_playbook

2021-06-25 Thread needabettername
Thanks Brian Not quite sure I understand, it's the output I'm trying to get (more of) to understand why it's failing. In case it helps at all Here's the play 2 created that it fails on. This is fine to run directly through ansible-playbook, just not through that play1 - hosts: nott

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread Wei-Yen Tan
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/slurp_module.html Get Outlook for iOS From: Wei-Yen Tan Sent: Saturday, June 26, 2021 9:02:14 AM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] How to

[ansible-project] How to manage different password for different group with same hostname

2021-06-25 Thread Dhineshkumar Chandralingam
How to manage different password for different group with same hostname ? Ex., [group1] test-01 ansible_sudo_pass='pass1' ansible_ssh_pass='pass1' test-02 test-03 test-04 [group2] test-01 ansible_sudo_pass='pass3' ansible_ssh_pass='pass4' -- You received this message because you are

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread Wei-Yen Tan
That's not using the slurp module Get Outlook for iOS From: ansible-project@googlegroups.com on behalf of bulent senguler Sent: Saturday, June 26, 2021 8:57:56 AM To: Ansible Project Subject: Re: [ansible-project] How to copy a file from

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread bulent senguler
- name: copy file from windows to tower copy_win: src : c:\tmp\b.txt dest: /tmp remote_src: yes output : { "src": "c:\\test\\b.txt", "_ansible_no_log": false, "dest": "/tmp", "checksum": "f88f94f974393a32cedc172ea3f7f4affb82f4c2", "changed": true,

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread Wei-Yen Tan
What do yoy mean. Is it doing the same thing? Can you please share play book and task? Get Outlook for iOS From: ansible-project@googlegroups.com on behalf of bulent senguler Sent: Saturday, June 26, 2021 8:25:00 AM To: Ansible Project

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread bulent senguler
Actually, as a same result. 25 Haziran 2021 Cuma tarihinde saat 22:42:56 UTC+3 itibarıyla weiye...@gmail.com şunları yazdı: > Slurp to ansible controller then copy to linux > > Get Outlook for iOS > -- > *From:* ansible...@googlegroups.com

Re: [ansible-project] Creating a Group and Project within a group with gitlab module

2021-06-25 Thread Michael Weiner
Anyone know who maintain the git lab project modules? On Wed, Jun 23, 2021 at 12:16 PM Michael Weiner wrote: > Doesn't work at all > > On Wed, Jun 23, 2021 at 12:05 PM Wei-Yen Tan wrote: > >> >> There is a git lab project module. Use that and refer to the gitlab group >> in it >> >> >> On Wed,

Re: [ansible-project] How to copy a file from windows to linux

2021-06-25 Thread Wei-Yen Tan
Slurp to ansible controller then copy to linux Get Outlook for iOS From: ansible-project@googlegroups.com on behalf of bulent senguler Sent: Saturday, June 26, 2021 7:41:26 AM To: Ansible Project Subject: [ansible-project] How to copy a

[ansible-project] How to copy a file from windows to linux

2021-06-25 Thread bulent senguler
Hi all, I want to copy a file from windows to linux but I cannot do that. I trıed win_copy module and remote_src=yes and job was success but the file did not exist on target machine. Where I am wrong. Thanks for helps. -- You received this message because you are subscribed to the Google

Re: [ansible-project] Using a variable in a loop

2021-06-25 Thread Matt Martz
See https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#registering-variables-with-a-loop On Fri, Jun 25, 2021 at 1:59 PM lift...@gmail.com wrote: > Thanks! I feel stupid. That worked. However, now I'm getting an error > in printing out the user's email address. I'm

Re: [ansible-project] Using a variable in a loop

2021-06-25 Thread lift...@gmail.com
Thanks! I feel stupid. That worked. However, now I'm getting an error in printing out the user's email address. I'm registering a variable called email, and when I do the debug message, I get an error that says that stdout isn't defined. if I just print out the variable 'email' I see

Re: [ansible-project] Merging two dictionaries from different files.

2021-06-25 Thread Steve Button
When I said "This solution" I meant to post the link... https://groups.google.com/g/ansible-project/c/pGbRYZyqxZ4 On Fri, 25 Jun 2021 at 19:49, Steve Button wrote: > I'm have two files one which represents the default case, and another for > a specific environment. > > variables/all.yml: >

Re: [ansible-project] Using a variable in a loop

2021-06-25 Thread Matt Martz
Instead of: loop: - "{{ users }}" You want: loop: "{{ users }}" Otherwise, you are creating a list in YAML with the value of users as the single element. On Fri, Jun 25, 2021 at 1:44 PM lift...@gmail.com wrote: > I'm trying to look through a loop of users to get their email

[ansible-project] Merging two dictionaries from different files.

2021-06-25 Thread Steve Button
I'm have two files one which represents the default case, and another for a specific environment. variables/all.yml: all: vars: myapp: COMPONENT_NAME: "app" (and another hundred or so default settings for myapp) variables/devenv.yml: all: vars: myapp: PORT_NUMBER:

[ansible-project] Using a variable in a loop

2021-06-25 Thread lift...@gmail.com
I'm trying to look through a loop of users to get their email addresses from an IPA server. When I run it, I get an error stating that "name" is an undefined variable. Can anyone see what I'm doing wrong? --- - hosts: localhost become: yes become_method: sudo gather_facts: no

Re: [ansible-project] Issue with folder permissions with a playbook

2021-06-25 Thread lift...@gmail.com
Didn't make a difference. When I run the bash script and do a "getfacl" on that directory, the group is rwx: # file: Adaptation/ # owner: user1 # group: mygroup # flags: -s- user::rwx group::rwx With the playbook its rx: # file: Adaptation/ # owner: user1 # group: mygroup # flags: -s-

[ansible-project] find ansible_fqdn and default_ipv4.address with ansible hostvars

2021-06-25 Thread Gustave Pablo
There are my .j2 template and playbook to generate hostname, fqdn and ipv4 for all manage node --> vi hosts.j2 {% for i in groups['all'] %} {{ hostvars[i].inventory_hostname }} {{hostvars[i].ansible_fqdn }} {{hostvars[i].ansible_default_ipv4.address }} {% endfor %} --> vi hosts.yml --- -

Re: [ansible-project] Re: Getting Error while running playbook "msg": "[Errno None] Unable to connect to port 22

2021-06-25 Thread subrat mangaraj
Hi Can someone guide. On Thu, 24 Jun 2021, 10:14 subrat mangaraj, wrote: > Hello All, > > Can someone guide. > > On Mon, Jun 21, 2021 at 3:36 PM subrat mangaraj > wrote: > >> >> >> Hello Experts, >>> >>> Can someone guide. >>> >>> Br// >>> Subrat >>> >>> On Sun, 20 Jun 2021, 10:19 subrat

Re: [ansible-project] Issue with folder permissions with a playbook

2021-06-25 Thread Brian Coca
mode: '022770' <= seems like a suspect -- -- Brian Coca -- 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] Issue with folder permissions with a playbook

2021-06-25 Thread lift...@gmail.com
We have a bash script that creates some folders and puts some ACLs on them, and we're trying to do this with an Ansible playbook. When we run the bash script, the group permission is rwx like we want, but when running the playbook, it is only rx. Any ideas as to why? Bash script: function

Re: [ansible-project] help debugging calling import_playbook

2021-06-25 Thread Brian Coca
The import would not fail with connection issues, no connection is involved, what is failing is a task, but you are not providing enough output to determine which task it is. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible

[ansible-project] help debugging calling import_playbook

2021-06-25 Thread needabettername
I need help getting more information on why an import_ playbook fails please During a play (play 1) I'm (ansible.builtin.template) sucessfully templating out another play (play 2) and variables file and using trying to call them later in play 1, but that import fails import_playbook:

[ansible-project] How to get the hostname into jinja file

2021-06-25 Thread Abdulrazzaq shaik
Hi Folks, Thank you for reading this. My expectation is to get the hostname from the inventory file, please help how to get this. Jinjafile : teaserverurl: "http://{{tibcoteahost}}:8777/tea; vars file : tibco_tea_group: "{{ groups['tibco_tea'] | default(ansible_play_hosts) | sort }}"

[ansible-project] Re: how to rewrite this the proper way?

2021-06-25 Thread gregory....@gmail.com
found a solution myself - name: find interface without an ip set_fact: desired_interface_name: "{{ item }}" when: hostvars[inventory_hostname]['ansible_'+item].ipv4|length == 0 # ansible_{{ item }}.ipv4 is defined and (ansible_{{ item }}|length>0) with_items:

[ansible-project] how to rewrite this the proper way?

2021-06-25 Thread gregory....@gmail.com
Hello here's my playbook, I am looking for interface without IP: --- - hosts: all vars: interface_name: "" ipaddress: "{{ ansible_default_ipv4.address }}" tasks: - name: enumerate interfaces debug: msg: "{{ item }}" with_items: "{{ ansible_interfaces }}" -

Re: [ansible-project] change a schedule of a template.

2021-06-25 Thread Dick Visser
That is very little context. What is the target OS, what is currently available, what is the source of your data? etc etc On Fri, 25 Jun 2021 at 09:52, fgo...@gmail.com wrote: > > > Hello, > > I need to create a playbook to update a schedule linked to a Template, this > to automate the update a

[ansible-project] change a schedule of a template.

2021-06-25 Thread fgo...@gmail.com
Hello, I need to create a playbook to update a schedule linked to a Template, this to automate the update a lot of schedule time. Thank you Flavio Gobber -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and