Re: [ansible-project] template module thinks validation succeeded when it should have failed.

2018-08-20 Thread Dick Visser
The template module does the validation using the *new* configuration file. This takes places *before* the file is put into its final place, so it’s specifically *not* /etc/apache2/apache2.conf, but rather a temporary file. The location of this tempfile is part of the registered results: TASK

[ansible-project] template module thinks validation succeeded when it should have failed.

2018-08-20 Thread David Reagan
Can anyone clarify how the validate option of the template module works? I have deliberately configured apache with invalid configuration. On the command line `apache2 -t -f /etc/apache2/apache2.conf` fails with a syntax error. But the template module, configured with `validate: 'apache2 -t -f

[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] move messages from error queue to parent queue in Redhat Active MQ

2018-08-20 Thread Dick Visser
It says " Invalid JSON request". Which seems to make sense, as you have set the HTTP method to POST, but at the same time you have manually constructed the entire (GET) request, and also didn't configure any 'body' parameter. I'd start with supplying a properly formatted 'body' parameter first.

Re: [ansible-project] azure_rm_virtualmachine error when using zeros...

2018-08-20 Thread Eric Rousse
Yeha, at first I was unsure if it was maybe me. But I did a lot of testing, I was about to create a bug report. Thanks for the confirmation Jonathan! :) Le lundi 20 août 2018 15:13:09 UTC-4, Jonathan Lozada De La Matta a écrit : > > I think this is something you should file an issue to change

Re: [ansible-project] azure_rm_virtualmachine error when using zeros...

2018-08-20 Thread Jonathan Lozada De La Matta
I think this is something you should file an issue to change if the other modules accept names like that or it may be this module only accepts names that way. I took a quick look at the issues and did not see anything reported. On Mon, Aug 20, 2018 at 2:52 PM Eric Rousse wrote: > Hello, > > I

[ansible-project] azure_rm_virtualmachine error when using zeros...

2018-08-20 Thread Eric Rousse
Hello, I have a case here were I need to create VMs with a name based on a sequence and that sequence will generate numbers from 01 to 05 for example. When I use the same sequence with azure_rm_networkinterface and azure_rm_securitygroup, is works fine and uses the same value for the name.

Re: [ansible-project] How to pass different executable files in ansible / pass run the script using source and expect?

2018-08-20 Thread Sakthivel G
Echo "y" | tsm pending-changes apply Try this On Mon 20 Aug, 2018, 11:45 PM cutiee, wrote: > I am trying to pass a prompt y in ansible when it executes command. > When i do manually on server it asks for a prompt. > > The issue is for command to run i need to pass the executable /bin/bash >

Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-20 Thread Malcolm Hussain-Gambles
If you are using Jenkins & ansible it's better to store the playbooks/roles/inventories in git and use Jenkins to check it out. Makes developing easier imho -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

[ansible-project] How to pass different executable files in ansible / pass run the script using source and expect?

2018-08-20 Thread cutiee
I am trying to pass a prompt y in ansible when it executes command. When i do manually on server it asks for a prompt. The issue is for command to run i need to pass the executable /bin/bash *command: `source /etc/profile.d/tableau_server.sh && tsm pending-changes apply`* for expect command to

[ansible-project] details of instance value

2018-08-20 Thread coach rhca
Hi, Could you please help .. am unable to retrieve the public ip address of the ec2 instance to add it to the host inventory.. - name: Create an ec2 instance ec2: key_name: "{{ keypair }}" group: sg_webserver_group instance_type: "{{ instance_type}}"

Re: [ansible-project] webserver secure

2018-08-20 Thread coach rhca
sure On Mon, Aug 20, 2018 at 9:59 PM, 'Felix Fontein' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi Coach, > > you might want to start a new thread for a new question about something > completely different. Re-using the old thread might cause people who > could otherwise

[ansible-project] Delete Partition Table

2018-08-20 Thread dmartin
Hi everyone! I'm trying to clear a partition table. That is, delete all partitions. I don't see how to do that with the parted module. Thanks! -Dylab -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

Re: [ansible-project] Re: fortios need host, username, password in every "- name"

2018-08-20 Thread nbctcp
SOLVED tq On Monday, August 20, 2018 at 11:35:09 PM UTC+7, Kai Stian Olstad wrote: > > On 20.08.2018 18:09, nbctcp wrote: > > PROBLEMS: > > -with working playbook. > > backup applied on both fgt1 and fgt2 but > > address (LAN) and policy task (LAN2WAN DNS) only applied on fgt1 > > > >

Re: [ansible-project] Access Splunk alerts through ansible

2018-08-20 Thread Jonathan Lozada De La Matta
can you describe more what are you trying to do with those alerts? you need to go into more detail in what you are trying to do. On Mon, Aug 20, 2018 at 12:37 PM Pradeep Drall wrote: > I would like to access Splunk alerts through ansible. We have several > alerts in Splunk which we wants to

[ansible-project] Access Splunk alerts through ansible

2018-08-20 Thread Pradeep Drall
I would like to access Splunk alerts through ansible. We have several alerts in Splunk which we wants to access through ansible. Please do let me know can we access splunk alerts via ansible. If so, let me know the steps. -- You received this message because you are subscribed to the

Re: [ansible-project] Re: fortios need host, username, password in every "- name"

2018-08-20 Thread Kai Stian Olstad
On 20.08.2018 18:09, nbctcp wrote: PROBLEMS: -with working playbook. backup applied on both fgt1 and fgt2 but address (LAN) and policy task (LAN2WAN DNS) only applied on fgt1 WORKING # cat forti.yml --- - name: fortios command connection: local hosts: forti tasks: - name: backup

[ansible-project] move messages from error queue to parent queue in Redhat Active MQ

2018-08-20 Thread Pradeep Drall
Hi, I would like to move messages from error queue to parent queue in Redhat Active MQ. I want to automate Jolokia REST Url moveMessages(int,java.lang.String,java.lang.String,boolean) concept through ansible uri module but getting below mentioned error. I use POST and PUT method but

Re: [ansible-project] webserver secure

2018-08-20 Thread 'Felix Fontein' via Ansible Project
Hi Coach, you might want to start a new thread for a new question about something completely different. Re-using the old thread might cause people who could otherwise help you ignore your question because they think it is about the old topic. Also, the people who answered to the old thread

Re: [ansible-project] How to solve the {"Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n", "unreachable": true} issue

2018-08-20 Thread Dick Visser
On 17 August 2018 at 17:28, Kai Stian Olstad wrote: > On 17.08.2018 16:08, Jim H wrote: >> >> I am using Ansible to create and setup new virtual machine. >> >> after the VM is created, if I use playbook to setup VM >> *ansible-playbook config-vm.yml -i ../../vms --extra-vars >>

[ansible-project] Re: fortios need host, username, password in every "- name"

2018-08-20 Thread nbctcp
PROBLEMS: -with working playbook. backup applied on both fgt1 and fgt2 but address (LAN) and policy task (LAN2WAN DNS) only applied on fgt1 WORKING # cat forti.yml --- - name: fortios command connection: local hosts: forti tasks: - name: backup fortios_config: host: fgt1

[ansible-project] expect command help in shell script

2018-08-20 Thread cutiee
I am trying to pass a prompt y in ansible when it executes the below command. When i do manually on server it asks for a prompt. How should i do it with ansible using shell module.Please help with passing the prompt in ansible ubuntu@ip-xx-xxx-xx-xx:~$ tsm pending-changes apply This

Re: [ansible-project] webserver secure

2018-08-20 Thread coach rhca
any valuable inputs from you experts ..not sure if calling it the right way after register the variable.. On Mon, Aug 20, 2018 at 10:47 AM, coach rhca wrote: > Could you please help .. am unable to retrieve the public ip address of > the ec2 instance to add it to the host inventory.. > > -

Re: [ansible-project] Best practice - Passwordless authentication or use --ask-pass before executing playbook?

2018-08-20 Thread Jonathan Lozada De La Matta
ssh keys On Mon, Aug 20, 2018 at 11:38 AM amruth wrote: > Hi, > > Can someone please say me the best practice of connecting to remote > machines from Ansible hosted machine? Would it be a password less > authentication by adding ssh-keys or use --ask-pass every time I execute > the playbook? >

Re: [ansible-project] fortios need host, username, password in every "- name"

2018-08-20 Thread Jonathan Lozada De La Matta
are you able to connect to it regularly? at the end you can see this error }, "msg": "Error connecting device" On Mon, Aug 20, 2018 at 11:37 AM nbctcp wrote: > with this setting, I got this erro > > # cat playbooks/forti.yml > --- > - name: fortios command > connection: local > hosts:

Re: [ansible-project] fortios need host, username, password in every "- name"

2018-08-20 Thread nbctcp
with this setting, I got this erro # cat playbooks/forti.yml --- - name: fortios command connection: local hosts: forti tasks: - name: backup fortios_config: host: forti username: "{{ansible_user}}" password: "{{ansible_ssh_pass}}" backup: yes

[ansible-project] Best practice - Passwordless authentication or use --ask-pass before executing playbook?

2018-08-20 Thread amruth
Hi, Can someone please say me the best practice of connecting to remote machines from Ansible hosted machine? Would it be a password less authentication by adding ssh-keys or use --ask-pass every time I execute the playbook? Thanks -- You received this message because you are subscribed to

Re: [ansible-project] Understanding become_user Privilege Escalation

2018-08-20 Thread amruth
Hi Pandu, 1. jenkins user is added to the wheel group(but not a password less sudo). My aim is to create a playbook where it gets connected to the remote machines and add ssh keys for password less ssh and add a line entry to sudoers file for password less sudo. 2. I am executing playbook with

Re: [ansible-project] Create VM on VMWare and register on RHN

2018-08-20 Thread Enzo
I solved so: --- - name: Create Linux VM hosts: localhost connection: local gather_facts: no tasks: - name: Install Linux server vmware_guest: hostname: '{{ vcenter_server }}' username: '{{ vcenter_user }}' password: '{{ vcenter_password }}' validate_certs:

Re: [ansible-project] Create VM on VMWare and register on RHN

2018-08-20 Thread Jonathan Lozada De La Matta
try https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#turning-off-facts On Mon, Aug 20, 2018 at 8:38 AM Enzo wrote: > Thank you Jonathan for your suggestion. > > Now I have this playbook: > > --- > - name: Create Linux VM > hosts: localhost > connection: local >

Re: [ansible-project] Create VM on VMWare and register on RHN

2018-08-20 Thread Enzo
Thank you Jonathan for your suggestion. Now I have this playbook: --- - name: Create Linux VM hosts: localhost connection: local gather_facts: True tasks: - name: Install Linux server vmware_guest: hostname: '{{ vcenter_server }}' username: '{{ vcenter_user }}'

Re: [ansible-project] fortios need host, username, password in every "- name"

2018-08-20 Thread Jonathan Lozada De La Matta
also check out ansible vault On Mon, Aug 20, 2018 at 4:16 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Monday, 20 August 2018 05.58.58 CEST nbctcp wrote: > > I have playbook for fortios and working. > > But is that possible > > 1. I don't want to put password in playbook,

Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-20 Thread 'J Hawkesworth' via Ansible Project
Jenkins usually operates on a 'workspace' which is different for each jenkins job. So in your case it would expect to find files in /var/lib/jenkins/workspace/ Ansible_create_user not in /home/ansible/create_user.yml You might find another tool provides tighter integration with your playbooks

Re: [ansible-project] Understanding become_user Privilege Escalation

2018-08-20 Thread Pandu jh
Need below info. 1. Can you paste here, sudo entry lines of jenkins user from sudoers file. 2. From which user id you are executing the playbook? >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] fortios need host, username, password in every "- name"

2018-08-20 Thread Kai Stian Olstad
On Monday, 20 August 2018 05.58.58 CEST nbctcp wrote: > I have playbook for fortios and working. > But is that possible > 1. I don't want to put password in playbook, but put that in > group_vars/forti.yml > > # cat ../hosts > [cisco] > cisco1 ansible_host=10.0.10.121 > > [forti] > fgt1

Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-20 Thread Vamsi Krishna
HI Vinod, As informed in my previous post, i have already placed script in the same path root@servername#ls -l /home/ansible/create_user.yml -rwxrwxrwx 1 ansible ansible 384 Aug 17 10:01 /home/ansible/create_user.yml Regards Vamsi On Monday, August 20, 2018 at 11:07:17 AM UTC+5:30, vinoth