[ansible-project] Checking for a string and value

2018-03-09 Thread Vino B
Hi All, Request your help, I need to find whether the string numa_balancing is set to disabled in the file /etc/default/grub where the string in contained in the string GRUB_CMDLINE_LINUX_DEFAULT any help on this is much appreciated. cat /etc/default/grub|grep GRUB_CMDLINE_LINUX_DEFAULT

[ansible-project] New Ansible setup architecture

2018-03-09 Thread DevOpsUnleashed
. -- 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 to

Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-09 Thread Toshio Kuratomi
Your having a different problem than the person you replied to. Your issue is that you don't have permission on the directory that you are asking ansible to create (/etc/ ). The original poster was having problems with an internal ansible temporary directory. For your issue, you need the

[ansible-project] Is there an easy way, or tool, to check what versions of Ansible a role is compatible with?

2018-03-09 Thread David Reagan
Is there an easy way or tool to check what versions of Ansible a role is compatible with? I have several roles I'm considering adding to Ansible Galaxy. I'd like to have as accurate of a version requirement as I can. But I also do not want to take the time to install Ansible a whole bunch of

[ansible-project] Re: must be stored as a dictionary/hash

2018-03-09 Thread sanjanith reddy
aws_keys has both access key and secret key of my EC2 user. On Friday, 9 March 2018 15:12:16 UTC-8, Tony Chia wrote: > > what is the content of your aws_keys.txt ? > > Normally the file used with the include statement has .yml extension. Not > sure if that makes any difference > > On Friday,

[ansible-project] Re: must be stored as a dictionary/hash

2018-03-09 Thread sanjanith reddy
My aws_keys.txt has access key and secret key of my EC2 user. On Friday, 9 March 2018 14:29:12 UTC-8, sanjanith reddy wrote: > > Hi All, > I'm trying to launch an EC2 instance via a playbook. My playbook contents > are like this: > > --- > > - name: Create an EC2 Instance > > hosts: localhost

[ansible-project] Re: must be stored as a dictionary/hash

2018-03-09 Thread Tony Chia
what is the content of your aws_keys.txt ? Normally the file used with the include statement has .yml extension. Not sure if that makes any difference On Friday, March 9, 2018 at 2:29:12 PM UTC-8, sanjanith reddy wrote: > > Hi All, > I'm trying to launch an EC2 instance via a playbook. My

[ansible-project] must be stored as a dictionary/hash

2018-03-09 Thread sanjanith reddy
Hi All, I'm trying to launch an EC2 instance via a playbook. My playbook contents are like this: --- - name: Create an EC2 Instance hosts: localhost gather_facts: false vars: keypair: Ansible_demo instance_type: t2.micro amiid: ami-72aba312 region: us-west-1

[ansible-project] Passing extra_vars via provisioning callback using PowerShell

2018-03-09 Thread travisk
Hello, I have a template that needs to be run against Windows hosts that make use the callback URL to initiate the job against them. This works for that purpose: Invoke-WebRequest -Method POST -Body @{host_config_key=''} However, I also need to pass extra_vars as a part of the callback.

[ansible-project] Cronjobs

2018-03-09 Thread Adam
Hi - I've got a task to manage cronjobs on systems that works perfectly fine unless I have the following as the job: find /iqstage01/archive/* /iqstage01/error/* -type f -exec gzip {} \; Ansible doesn't like the escape on the semi-colon. Does anyone have any ideas why? Thanks, Adam -- You

Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-09 Thread Vamsi krishna
Hello @Toshio , Thanks for your response, i tried and i changed in the ansible.cfg file to remote_tmp: /var/tmp and still same error Yaml file i am using name: using hosts: all tasks: - name: creates directory file: path: /etc/ state: directory owner:

Re: [ansible-project] Use Ansible to audit server configs across life-cycle environments?

2018-03-09 Thread Andrew Latham
You could check for a "file stat get_md5" and register it for output to a datafile On Fri, Mar 9, 2018 at 11:04 AM, Len S wrote: > > Does Ansible provide the ability to effectively provide a diff of configuration files of server components across lifecycle

[ansible-project] Arris Modules

2018-03-09 Thread 'Juraj Papic' via Ansible Project
Hello, Has anyone worked with Arris network with Ansible? Thanks. -- *BGH* informa que todos los actos o hechos que se interpreten como contrarios a los principios establecidos por el Código de Ética y Conducta de la

Re: [ansible-project] Use Ansible to audit server configs across life-cycle environments?

2018-03-09 Thread Brian Coca
Ansible does not do this automatically, but you can use fetch/slurp/copy and diff mode to accomplish it. -- -- 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

[ansible-project] Use Ansible to audit server configs across life-cycle environments?

2018-03-09 Thread Len S
Does Ansible provide the ability to effectively provide a diff of configuration files of server components across lifecycle environments? I have a requirement to be able to tell if my JVM's and AppServers have the same configuration across acceptance and production. I know Ansible provides

[ansible-project] Ansible task failing on error " VARIABLE NOT DEFINED"

2018-03-09 Thread Zulkifal Sahibzada
Hi list, I am new to this Ansible world. I am using a playbook from sandersv32/cis rhel-7-ansible section-5.2.2 which is giving me an error "VARIABLE NOT DEFINED'. Here is the task I am running -name: 5.2.2 Enable auditd Service (Scored) shell: systemctl is-enabled auditd.service

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
Thanks I am sorry not sure of how to write this backspace can you give an example please On Friday, March 9, 2018 at 4:32:59 PM UTC, Kai Stian Olstad wrote: > On Friday, 9 March 2018 16.59.55 CET 'Daley Okuwa' via Ansible Project > wrote: > > Thanks > > > > I added one more exit making

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread Kai Stian Olstad
On Friday, 9 March 2018 16.59.55 CET 'Daley Okuwa' via Ansible Project wrote: > Thanks > > I added one more exit making it two exit at the same place and still error > message I would suggest you add more exit to see if you get anywhere. > "msg": "No remaining responses for

Re: [ansible-project] Unable to run two commands simultaneously

2018-03-09 Thread Dave
Good catch. Thanks. On Friday, March 9, 2018 at 11:16:38 AM UTC-5, Matt Martz wrote: > > The `with_items` keyword is indented too far. It should be in alignment > with `command` and `name`, and not nested underneath. > > It is a task keyword, as opposed to a module argument. > > On Fri, Mar 9,

Re: [ansible-project] Unable to run two commands simultaneously

2018-03-09 Thread Matt Martz
The `with_items` keyword is indented too far. It should be in alignment with `command` and `name`, and not nested underneath. It is a task keyword, as opposed to a module argument. On Fri, Mar 9, 2018 at 10:01 AM, Dave wrote: > I'm trying to figure out where I'm going

[ansible-project] Unable to run two commands simultaneously

2018-03-09 Thread Dave
I'm trying to figure out where I'm going wrong here. I have two raw commands to run, one of which concatenates and copies two files into one and the other just overwrites another file and I'm getting a syntax error on the command: "{{ item }}" when I try to run the script. I tried

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
Thanks I added one more exit making it two exit at the same place and still error message The full traceback is: File "/tmp/ansible_BvrW7j/ansible_module_expect.py", line 109, in wrapped return next(resp_gen) fatal: [10.201.250.41]: FAILED! => { "changed": false, "invocation": {

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread Kai Stian Olstad
On Friday, 9 March 2018 16.19.37 CET 'Daley Okuwa' via Ansible Project wrote: > fatal: [10.201.250.41]: FAILED! => { > "changed": false, > "invocation": { > "module_args": { > "chdir": null, > "command": "ssh admin@10.101.250.41", > "creates":

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
This code works when I comment out the following in red - name: backup of juniper using expect hosts: juniper connection: local tasks: - name: copy running config to ftp server expect: command: ssh admin@10.101.250.41 responses: Password: xx

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
Thanks This is the debug mode of the playbook ansible@ansible-new:/etc/ansible$ ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -vvv backup-juniper-expect.yml ansible-playbook 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path =

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread Kai Stian Olstad
On Friday, 9 March 2018 13.37.28 CET 'Daley Okuwa' via Ansible Project wrote: > Thanks > > Changed code to this > > > > --- > - name: backup of juniper using expect > hosts: juniper > connection: local > tasks: >- name: copy running config to ftp server > expect: >

[ansible-project] Re: Sample code of "nested loops" with a "When condition"

2018-03-09 Thread Thomas Hikade
Hi Is that what you were looking for?: https://groups.google.com/d/msg/ansible-project/lnDlMfhetwU/qRm62YTgBQAJ regards Thomas -- 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: Ansible Disk Usage and Disk Space Full Alert generation Script.

2018-03-09 Thread Thomas Hikade
In addition you might like to print out the name of your FS which is too big. For that you need the names again in the last debug loop. You could fix that like this, using advanced looping statement "with_together" (Ansible Loops

[ansible-project] Re: Ansible Disk Usage and Disk Space Full Alert generation Script.

2018-03-09 Thread Thomas Hikade
Hi Kiran A few problems: First. you register the *results *(plural) of your with_items loop in the first shell command. That means,* test.results* is actually a list of result objects! Thus you cannot simply compare the value "20" with *test.results*. Instead, you need to loop over*

[ansible-project] "AnsibleUndefinedVariable: 'dict object' has no attribute

2018-03-09 Thread jaychandran subramanian
> > > > [WARNING]: log file at /var/log/ansible.log is not writeable and we cannot > create it, aborting > ansible 2.4.3.0 > config file = /etc/ansible/ansible.cfg > configured module search path = [u'/usr/share/my_modules'] > ansible python module location = >

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
Thanks Changed code to this --- - name: backup of juniper using expect hosts: juniper connection: local tasks: - name: copy running config to ftp server expect: command: ssh admin@10.101.250.41 responses: Password: x admin@POD1_SRX210>:

Re: [ansible-project] expect model not working accoring to plan

2018-03-09 Thread Kai Stian Olstad
On 09.03.2018 12:43, 'Daley Okuwa' via Ansible Project wrote: Hi all, It is me again with config on boxes I am using the expect module it is working but not doing what I want it to do This is the code name: backup of juniper using expect hosts: juniper connection: local tasks: -

[ansible-project] expect model not working accoring to plan

2018-03-09 Thread 'Daley Okuwa' via Ansible Project
Hi all, It is me again with config on boxes I am using the expect module it is working but not doing what I want it to do This is the code name: backup of juniper using expect hosts: juniper connection: local tasks: - name: copy running config to ftp server expect: