Re: [ansible-project] Save output to text file

2020-07-12 Thread Luca 'remix_tj' Lorenzetto
Hello, Since you're collecting your results with a loop, you'll have several results registered in enviro variable. enviro.results[0].stdout will point to the stdout of the first command, and so on. Luca Il lun 13 lug 2020, 00:25 Tcpip ha scritto: > Hello > > I have my playbook that will just

[ansible-project] Save output to text file

2020-07-12 Thread Tcpip
Hello I have my playbook that will just execute df -h and ls -ll teh issue is that is not being able to save the output to a txt file --- - name: Devices to get output hosts: centos2 connection: local tasks: - name: GET LINUX INFO shell: cmd: "{{ item }}" with_ite

Re: [ansible-project] Re: ansible playbook - define data in excel sheets

2020-07-12 Thread Antony Stone
On Sunday 12 July 2020 at 17:00:27, stack flow wrote: > > how to write yml to read data from each of the sheet of xlsx. I am unable > > to find ansible module for this. I suggest you investigate https://linux.die.net/man/1/ssconvert. Antony, -- This sentence contains exacly three erors.

[ansible-project] create role or just use playbook

2020-07-12 Thread Tony Wong
do I create roles with ansible-galaxy or just use playbook? I got a playbook to install nginx --- - hosts: lanhosts become: yes vars_files: ~/ansible/vault.yml vars: ansible_become_pass: '{{my_become_pass}}' tasks: - name: Installs nginx web server apt: name: nginx

[ansible-project] Storing nginx variables and using in templates

2020-07-12 Thread Ing. Chrstopher Golden
I have two problems. I want to store the variables of both examples in the host_vars/server_name.yml file. Here are the raw format of the values that I want to store: (1) nginx log formats: log_formatmain '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_

[ansible-project] Re: ansible playbook - define data in excel sheets

2020-07-12 Thread stack flow
some help please. On Saturday, July 11, 2020 at 10:43:19 PM UTC-4, stack flow wrote: > > I have excel file data.xslx and it has two sheets: > > sheet1: > > Hostname Mgmt_ip > Switch-1 10.0.0.1 > Switch-2 10.0.0.2 > Switch-3 10.0.0.3 > > > sheet2: > > Interface Interface_IP Description > Ethernet1/

[ansible-project] Install CloudEndure Agent

2020-07-12 Thread Naresh Kasula
Hi, Am using CloudEndure for migrating servers to AWS, for this we need to install "Agentinstall" on migrate server so that they both can communicate for further process. == Installat

[ansible-project] Ansible module "template" support for Jinja2 new class "ChainableUndefined"

2020-07-12 Thread Baeschtu
According to the release notes of Jinja2 Version 2.11.0 (released on 2020-01-27) there is a new class named "ChainableUndefined" to handle undefined variables on multiple levels in Jinja2 templates. Currently, I use a ansible task using the module "template" to render jinja2 templates. However,

[ansible-project] Waiting for Kubernetes Objects

2020-07-12 Thread kameshs
While using `community.kubernetes.k8s` module, I am seeing that `wait: yes` is cause the resource creation to fail in case of definition is a multi document yaml. Is there a way to wait for multi document k8s operations to complete ? e.g. ``` - name: k8s apply crds k8s: state: present definiti