Your issue is that Apps_files.files is a list, so Apps_files[0].path
would access the path of the FIRST file in that list, which means you
have to extract path for each item to make the fetch loop work:
- name:
fetch:
src: "{{ item }}"
dest: /APPADMIN/ansible/nonprod/DR_test/
loop:
yes, but you need to have facts already. This can be accomplished in 2
ways, 1) fact cache 2) meta: refresh_inventory after fact gathering
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this
Hi All,
I need to install pip and additional pip modules. Having trouble with
virtualenv, it's not installing.
What I have:
- name: install pip
easy_install:
name: pip
state: latest
- name: install additional pip modules
easy_install:
name: virtualenv
executable:
Hi,
I created a simple yml file to get file or files from a remote host to
local host:
$ cat fetch.yml
---
- hosts: serverA
tasks:
- name: find the files
find:
paths: /usr/local/apps/log
patterns: AppsAdmin.*.ALLAPPS.20190828*
use_regex: True
register: Apps_files
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:
>>
>> Hi,
>>
>> manually login
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:
>
> Hi,
>
> manually login to each servers and setting root password, login to
> server1, set password "password123" ; then login to server2 set
>
On 9/17/19 9:09 AM, Soniya panwar wrote:
As i understand your query you want to use custom list of jinja2
template paths. you can use fileglob module here to match all the files
of a particular pattern in a directory. This module return a list of paths.
Below is the example playbook:
[..]
Matt, thanks for your help.
Mike
--
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 view this discussion on
Sudo is too old.
This works:
---
- hosts: appsrv98
tasks:
- name: test (1/2)
command: uptime
- name: test (2/2)
command: uptime
become: true
become_flags: -H -S
--
You received this message because you are subscribed to the Google Groups
"Ansible Project"
That's an interesting thought.
Ansible isn't required on the remote machine; python is though.
Here's on the remote machine:
DEV App Server 98
appsrv98:meggle1:/home/meggle1> rpm -qi ansible
package ansible is not installed
DEV App Server 98
appsrv98:meggle1:/home/meggle1> python -V
Python 2.7.16
What is the version of sudo installed on `appsrv98`?
I have a feeling that `appsrv98` is a really old machine, maybe running EL5
or something like that. In which case, even if you can get past the sudo
issue, you'll run into python version issues as well.
On Wed, Sep 18, 2019 at 9:52 AM Mike
Removed Ansible 2.8.5 and installed Ansible 2.8.5.
Same error.
More simple playbook.
Changed "become: yes" to "become:true".
Same error:
---
- hosts: appsrv98
tasks:
- name: test (1/2)
command: uptime
- name: test (2/2)
command: uptime
become: true
On Wednesday,
Seth,
Yes, though it could be fairly technical in places.
If you are attending AnsibleFest check out the "Ansible Community, making
your mark" session on Tuesday, or if you aren't attending in person
https://www.ansible.com/resources/webinars-training/how-to-make-ansible-community-contributions
GNU/Linux: CentOS Linux release 7.6.1810 (Core)
Playbook:
---
- hosts: all
gather_facts: no
vars:
md5script: /pawn/bin/md5verify.sh
tasks:
- name: test (1/3)
command: uptime
- name: test (2/3)
command: uptime
become: yes
- name: test (2/3)
command:
Hi phani akkina,
With the help of vmware_vm_shell module(
https://docs.ansible.com/ansible/latest/modules/vmware_vm_shell_module.html)
you can execute command inside linux vm.
*Thanks & Regards*,
Aravind Balaji S
--
You received this message because you are subscribed to the Google Groups
Hi All,
I am deploying vms using *vmware_guest* module in vcenter.
I need to run some commands after the creation of the vms either Windows or
Linux. I am able run the commands in Windows with runonce.
Now I blocked to know how to run the commands in Linux after creation.
Can anyone guide me
Sorry I recently updated to CentOS 7.7.1909. I have installed ansible
through yum. This is in a home lab and I tried to do a yum history undo ##
and it failed broken dependencies.
On Wednesday, September 18, 2019 at 2:23:16 AM UTC-5, Vladimir Botka wrote:
>
> On Tue, 17 Sep 2019 19:06:36
Is there a way to create host variables based on the tags on an instance?
(without manually listing each variable and tag under the compose section)
The idea is bascially to allow the equivalent of the INI-style inventory
file using tags from AWS. (With the relevant variables using a prefix to
On Tuesday, June 5, 2018 at 11:55:04 PM UTC+2, WhileLoop wrote:
>
> Currently inventory.aws_ec2.yaml looks like this:
>
>
> plugin: aws_ec2
> regions:
> - us-west-2
> keyed_groups:
> - prefix: tag
> key: tags
>
>
> This creates one group for every tag combination. How can make it look at
My guess here is that the inventory gets generated before the setup module
runs, which means that the inventory plugin can't be used for that.
You should be able to get the desired effect using
https://docs.ansible.com/ansible/latest/modules/group_by_module.html
- group_by:
key: distro_{{
On Tue, 17 Sep 2019 19:06:36 -0700 (PDT)
Andrew Meyer wrote:
> I just updated CentOS 7 to the latest and now am getting this any playbook
> I try to run.
>
> [andrew@automation01 installer]$ ansible-playbook -i inventory install.yml -
> vv
> Traceback (most recent call last):
> File
That’s not a lot of information you’re giving.
How was ansible installed?
What in centos7 exactly did you update to the ‘latest’?
What versions mean latest? And what were they before that?
Dick
On Wed, 18 Sep 2019 at 04:06, Andrew Meyer wrote:
> I just updated CentOS 7 to the latest and now
Hi Shivharsh,
I tested the YAML syntax online it is showing correct.Kindly suggest the
way to correct it
here is YAML
---
# tasks file for ac.install
- name: make a new directory for downloading the installer
shell: mkdir -p /installer/NAM
#shell: cd /installer/NAM
#register:
Hi Everyone,
I am unable to download the file from FTP server, please suggest how can i
download file from FTP. My YAML script is as follows.
*YAML:-*
---
# tasks file for ac.install
- name: make a new directory for downloading the installer
shell: mkdir -p /installer/NAM
#shell: cd
24 matches
Mail list logo