[ansible-project] Re: Why playbook take wrong values for group variables?

2018-05-01 Thread Tony Chia
Do you have the following files defined?
/group_vars/group_A.yml
/group_vars/group_B.yml
/group_vars/all.yml
/inventories/group_vars/all.yml

also, maybe try using "hosts: *group_B" in *playbooks/playbook.yml instead 
of "hosts:*all"*


On Sunday, April 29, 2018 at 1:39:59 AM UTC-7, Олег Боровых wrote:
>
> Hi,
> favorite 
> 
>
> I have a problem with groups variables.
>
> Example: I have two inventory groups group_A and group_B, and also have 
> the same name files in group_vars:
>
> inventories/ 
>hosts.inv
>  [group_A]
>server1
>server2
>  [group_B]
>server3
>server4
>  group_vars/
>   group_A - file
> var_port: 9001
>   group_B - file
> var_port: 9002 
>
> The problem is when i execute playbook :
>
>  ansible-playbook  playbooks/playbook.yml -i inventories/hosts.inv -l 
> *group_B*
>
> playbook was executed for proper scope of servers (server3, server4) but 
> it takes variables from group variables file group_A.
>
> expected result:var_port: 9002
> in realty : var_port: 9001
>
> ansible 2.4.2.0
>
>  I can't understand what I am doing wrong?
>
> BR Oleg
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3a5e2a99-abab-4cc7-bf96-f4261d555388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] lineinfile module gives error: "chown failed: [Errno 1] Operation not permitted:

2018-05-01 Thread Malcolm Hussain-Gambles
You're trying to change the ownership of a file to root, you need to be root to 
do that

Cheers

Malcolm

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9c70db74-6d86-4d64-a485-eaa7fd2b15cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Can't Access to Jenkins from anywhere

2018-05-01 Thread Malcolm Hussain-Gambles
By locally you mean??? Using localhost?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/562720bf-4813-4352-a6a1-6c7d8b174459%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Using ansible to manage windows 10 vm software applications with no Internet Access

2018-05-01 Thread Matt Davies
Hi Jon

Thanks for getting back to me.

Your plan was what I was thinking of doing, or something along those lines 
anyway.

Due to me being such a lazy beggar I was hoping someone would have written 
up the process of building that sort of system, with all the pitfalls and 
things to watch out for.  I'm sure someone has to be honest, just need to 
find it.

Thanks again

Matt

On Sunday, 29 April 2018 20:42:54 UTC+1, J Hawkesworth wrote:
>
> I don't manage windows desktops, only windows servers, but one thing you 
> could do is put all the software you need on the ansible controller and 
> then put a web server on the ansible box too. Then you can fetch the 
> installers using ansible's win_get_url module, and install them with 
> win_package, or use win_command or win_shell to run the installers.
>
> Hope that is enough to get you started.
>
> Jon 
>
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0016b9cc-efd4-481e-93b6-6f6406921c5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible - Passing environment variables through files

2018-05-01 Thread Karl Auer
Not sure this is useful (you seem way ahead of me) but I pass e.g. "-e
env=blah" to ansible-playbook.

In my playbook (or wherever) I have include_vars:, and I specify e.g.
"path/to/{{env}}.yaml".

As long as all the environment files have the same variables in them (with
different values), it works fine.

To switch between groups of related environments I pass an additional
variable and use something like "path/to{{group}}/{{env}}.yaml"

I also have groups of unrelated environments; to select between those I set
an environment variable something like
"{{ansible_env.MY_ENV}}/path/to/{{env}}.yaml"

Bad syntax above, but you know what I mean :-)

Not sure I see what you mean by having to source bash_rc...? Maybe I am
confusing shell environment with "meta groupof variables"...

Regards, K.


On Wed, May 2, 2018 at 12:33 AM, Ashish Srivastava 
wrote:

> Hi All,
>
> I've have searched literally all the available medium on internet for this
> issue but could not find the solution. So decided to raise the problem in
> this group.
>
> I've a project having number of environments such as dev1, dev2, dev3,
> sit1, sit2 and so on, with total of 20 environments. These environments
> also share some servers between them.
> I'm using Ansible for application deployment.
>
> *Problem:* Before starting the deployment, I need to set the environment
> variables by declaring the *key:value *pair under "*environment*"
> section. It is not a problem if I have couple of environments to deploy but
> problem arises when environment multiplies.
> It is surely not feasible to create 20-30 main playbooks for each
> environment and declaring the environment variables to use for that
> deployment on playbook, as we need to source the .bashrc / .bash_profile
> for each environment.
>
> In my current set-up, I've created server_groups with environment names
> like dev1, dev2 etc. And, assigned servers to that group on Ansible Tower.
> To trigger the app deployment, I'm passing environment name(for eg. dev1 )
> which is then assigned to variable "env_name" in site_main.yml and
> deployment is done based on the servers in dev1 group.
> Environment variables for dev1 are declared under *environment* keyword
> in site_main.yml. But that becomes very clumsy if I have to manage n number
> of playbooks for n number of environments.
>
> Is there any way where I can create n number of environment files under
> *vars* or *group_vars* directory having variables of that environment?
> And, I can dynamically call the environment file such as
>
> *environment: "{{ env_name }}.yml"*
>
> I have seen examples such as below but env_name is hardcoded below and NOT
> dynamic:
>
> vars:
>  dev1:
>   variable1: "{{ value1 }}"
>   variable2: "{{ value2 }}"
>
> environment: "{{ dev1 }}"
>
> Can someone please suggest me the solution or any other better approach?
>
> Thanks,
> Ashish
>
> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/f424e6fb-0ec2-485c-ad84-a0236d8f9043%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Karl Auer

Email  : ka...@2pisoftware.com
Website: http://2pisoftware.com

GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08S1-02dSS8vBgujKt0AfFYAF7t_gLwr%3D%3DUuuTw6CvKR_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible - Passing environment variables through files

2018-05-01 Thread Ashish Srivastava
Hi All,

I've have searched literally all the available medium on internet for this 
issue but could not find the solution. So decided to raise the problem in 
this group.

I've a project having number of environments such as dev1, dev2, dev3, 
sit1, sit2 and so on, with total of 20 environments. These environments 
also share some servers between them.
I'm using Ansible for application deployment.

*Problem:* Before starting the deployment, I need to set the environment 
variables by declaring the *key:value *pair under "*environment*" section. 
It is not a problem if I have couple of environments to deploy but problem 
arises when environment multiplies.
It is surely not feasible to create 20-30 main playbooks for each 
environment and declaring the environment variables to use for that 
deployment on playbook, as we need to source the .bashrc / .bash_profile 
for each environment.

In my current set-up, I've created server_groups with environment names 
like dev1, dev2 etc. And, assigned servers to that group on Ansible Tower. 
To trigger the app deployment, I'm passing environment name(for eg. dev1 ) 
which is then assigned to variable "env_name" in site_main.yml and 
deployment is done based on the servers in dev1 group.
Environment variables for dev1 are declared under *environment* keyword in 
site_main.yml. But that becomes very clumsy if I have to manage n number of 
playbooks for n number of environments.

Is there any way where I can create n number of environment files under 
*vars* or *group_vars* directory having variables of that environment? And, 
I can dynamically call the environment file such as 

*environment: "{{ env_name }}.yml"*

I have seen examples such as below but env_name is hardcoded below and NOT 
dynamic:

vars: 
 dev1:
  variable1: "{{ value1 }}" 
  variable2: "{{ value2 }}"

environment: "{{ dev1 }}"

Can someone please suggest me the solution or any other better approach?

Thanks,
Ashish

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f424e6fb-0ec2-485c-ad84-a0236d8f9043%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Unable to run playbook (Syntax Error)

2018-05-01 Thread Brian Coca
so from emai (not a good source) the indentations were off in many
places, this is a 'fixed' version of your play:


- name: get version
  hosts: all
  gather_facts: false
  connection: local
  tasks:

   - name: run multiple commands on remote nodes
 ios_command:
   commands:
 - show version
 - show ip int brief
 register: print_output

   -  debug: var=print_output.stdout_lines


--
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+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7d3aix9jQG0OH1LTMf83Quw4Z03UFjAogTZmorJ3hG6Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible include tasks and get response.

2018-05-01 Thread Madushan Chathuranga
Hi,

Is it possible to execute a another yaml file with in a yaml file (import 
or include) passing arguments and register its output? Or else return it's 
output and assign to a variable 

Thanks.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d9fb6e58-142f-4baf-b28f-a2d0697a5f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Using 2 ansible versions

2018-05-01 Thread Varun Chopra
Thanks man. Wasn't sure if i should run ansible from source or install it 
in the virtualenv using pip.

On Tuesday, May 1, 2018 at 3:59:36 PM UTC+5:30, Varun Chopra wrote:
>
> Hi,
>
> I'm trying to install Ansible 2.3 on a server with 2.5 already present.
>
> I built and installed virtualenv and download ansible 2.3 and initiated a 
> virtualenv using source ./hacking/env-setup
>
> Will this new installation hinder with the 2.5 install in any way?
>
> How long does the virtualenv exist? How do I close the virtualenv and go 
> back to using 2.5?
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3697eb2f-e34e-47b8-a726-537509539d9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] recommended indent style for tasks

2018-05-01 Thread Josef Fortier
I'm modifying an EOL vim ansible plugin for my own use and am wondering 
about indent style. In the Ansible Intro to Playbooks doc 
( http://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html ) 
there are two separate styles on the same page:

At the start of the doc, each task item has it's leading dash flush with 
the "task:" keyword indent.

But later on, in the "Basics" header there's an alternate style, where each 
task item is indented a shift-width deeper then the "task:" keyword.

Both seem to work with python's YAML parser.

The second example appears to be slightly more common. Is there a 
recommended style?

Is there a more common/consensus style?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/782d5fac-05c5-4e6a-8df8-acbfdf237683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using 2 ansible versions

2018-05-01 Thread Kai Stian Olstad

On 01.05.2018 12:29, Varun Chopra wrote:

Hi,

I'm trying to install Ansible 2.3 on a server with 2.5 already present.

I built and installed virtualenv and download ansible 2.3 and initiated 
a

virtualenv using source ./hacking/env-setup

Will this new installation hinder with the 2.5 install in any way?

How long does the virtualenv exist? How do I close the virtualenv and 
go

back to using 2.5?


There is a lot of guides about Python virtual environment that you can 
read to get this information.

But I can give you this as an example

user@gh:~$ virtualenv ~/ansible2.3
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/user/ansible2.3/bin/python2
Also creating executable in /home/user/ansible2.3/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

(ansible2.3) user@gh:~$ pip install "ansible<2.4"
Collecting ansible<2.4
  Downloading 
https://files.pythonhosted.org/packages/d4/61/4080493544ecec71e770a20aa94cbd35a382813fac4fddb97573ae50bc7d/ansible-2.3.3.0.tar.gz 
(4.2MB)


Successfully built ansible PyYAML pycrypto MarkupSafe pycparser
Installing collected packages: MarkupSafe, jinja2, PyYAML, pycparser, 
cffi, enum34, idna, asn1crypto, six, ipaddress, cryptography, pynacl, 
pyasn1, bcrypt, paramiko, pycrypto, ansible
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.3.3.0 
asn1crypto-0.24.0 bcrypt-3.1.4 cffi-1.11.5 cryptography-2.2.2 
enum34-1.1.6 idna-2.6 ipaddress-1.0.22 jinja2-2.10 paramiko-2.4.1 
pyasn1-0.4.2 pycparser-2.18 pycrypto-2.6.1 pynacl-1.2.1 six-1.11.0


(ansible2.3) user@gh:~$ ansible --version
ansible 2.3.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]

(ansible2.3) user@gh:~$ deactivate

user@gh:~$ ansible --version
ansible 2.5.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = 
[u'/home/user/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/usr/lib/python2.7/dist-packages/ansible

  executable location = /usr/bin/ansible
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]

user@gh:~$ source ~/ansible2.3/bin/activate

(ansible2.3) user@gh:~$ ansible --version
ansible 2.3.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]

--
Kai Stian Olstad

--
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b0782c33064d7c13b458010f36dab9e8%40olstad.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Using 2 ansible versions

2018-05-01 Thread Varun Chopra
Hi,

I'm trying to install Ansible 2.3 on a server with 2.5 already present.

I built and installed virtualenv and download ansible 2.3 and initiated a 
virtualenv using source ./hacking/env-setup

Will this new installation hinder with the 2.5 install in any way?

How long does the virtualenv exist? How do I close the virtualenv and go 
back to using 2.5?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/064ac204-815a-4fe3-877c-5058606f3dbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] winrm not installed on CentOS - winrm added from epel

2018-05-01 Thread Panagiotis Filopoulos
I LOVE YOU!

On Monday, 2 January 2017 11:18:04 UTC+1, Jean-Yves LENHOF wrote:
>
> Hi,
>
> You probably need python-requests too
> yum install python2-winrm python2-requests_ntlm python-requests 
>
> To debug to see what package is needed, you can run python interactively 
> and do import winrm, it will put some messages to help you debug the 
> problem.
>
> Perhaps, you should do a bug report on bugzilla.redhat.com in order to 
> fix this.
>
> Regards,
>
> JYL
>
>
> 2 janvier 2017 04:00 "Tom Albrecht"  a 
> écrit:
>
> Hi,
> I'm working through trying ansible to manage windows hosts for the first 
> time using CentOS7 as my control machine and Windows 2012r2 as my target.
> The system I'm building is disconnected from the internet, so my only real 
> "outside" connection is the mirror I've made of the CentOS7 and EPEL 
> repositories I've created in my lab. Ansible v2.2.0 has been installed from 
> epel, and it's been working like a charm until now.
> Going through the Ansible Windows Intro 
> , I tried running 
> "ansible hostname -m setup", and get the "winrm is not installed" message. 
> While the document said to install winrm using pip, since I don't have 
> internet connectivity, I installed the python2-winrm package from epel, but 
> I still get the same message.
> Any ideas on what I can do to make ansible see my winrm installation?
> Thanks!
> Tom A.
>
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1114b21c-9a57-4d28-ab31-d778a9f15ee6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Can't Access to Jenkins from anywhere

2018-05-01 Thread yfa


I have installed the jenkins roles ans it works fine locally. I want to 
access to my jenkins server with IP:8080 /hostname:8080 but it doesn't 
works.

System config:
Ubuntum 16.04 Linux VM (Azure)


Jenkins roles :
geerlingguy .jenkins
https://galaxy.ansible.com/geerlingguy/jenkins/

Am I missing something?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9345dacd-9763-4885-861c-7201190c4e31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: VMware - convert template to virtual machines

2018-05-01 Thread Edward Ahern
Cheers Nick,

Plenty there to get stuck into there, appreciate it

Ted

On Tue 1 May 2018 at 03:25, Nick Rogers  wrote:

> Ok, here you go, it's still in progress, but it's up.
>
> https://github.com/nickrnet/ansible-vmware
>
>
> On Saturday, April 28, 2018 at 5:32:41 AM UTC-5, Ted wrote:
>
>> Hi Nick,
>>
>> Thanks for the reply. If you could put it up on Github that would be
>> brilliant.
>>
>> Thanks again,
>>
>> Ted
>>
>> On Fri 27 Apr 2018 at 23:00, Nick Rogers  wrote:
>>
> I do all of this with playbooks and the Ansible vmware_guest module with
>>> Ansible 2.4.4 against vCenter currently - though I am not sure the status
>>> of the vmware_guest module goingb forward (there are Github issues in 2.5
>>> that discuss removing/depracating it).
>>>
>>> I have the following structure:
>>> project
>>> - inventory
>>> ... other inventory dirs ...
>>> - vms
>>> - group_vars
>>> all.yml
>>> - host_vars
>>> rhel75x64-base.yml
>>> rhel75x64-updated.yml
>>> hosts
>>> - playbooks
>>> ... other playbook dirs ...
>>> - vcenter
>>> create_snapshots.yml
>>> revert_snapshots.yml
>>> update_template.yml
>>> - roles
>>> ... other role dirs ...
>>> - vcenter
>>> - tasks
>>> create_snapshot.yml
>>> create_template.yml
>>> create_vm.yml
>>> delete_vm.yml
>>> refresh_vm.yml
>>> revert_snapshot.yml
>>> shutdown_vm.yml
>>> start_vm.yml
>>> - vars
>>> main.yml
>>>
>>> We have the following set up on a schedule:
>>> playbooks/vcenter/update_template.yml gets run weekly and creates a vm
>>> in our vcenter, updates it from our yum repo, and turns it into a template
>>> playbooks/vcenter/create_snapshots.yml gets run weekly (1 hour later
>>> than update_template) that destroys a vcenter inventory, creates a new set
>>> in vcenter, and creates snapshots so they are ready for CI builds
>>>
>>> If you'd like more info, I can thow it in a Github for you to peruse,
>>> but will be a day or so.
>>>
>>>
>>> On Friday, April 27, 2018 at 8:55:55 AM UTC-5, Ted wrote:

 Hi All,

 I'm looking for a way to convert a VMware template to a virtual machine
 using Ansible.
 The work flow is:
 Convert a template to a virtual machine
 Power on
 Login to the virtual machine
 Update the OS patches (Linux)
 Power off
 Convert Virtual machine back to template

 As you can see I want to keep the patch levels up to date on my
 templates and do all the above in Ansible.
 I've searched for ways to do this but haven't come up with anything.

 Any suggestions are most welcome.

 Thanks,

 Ted

 --
>>> 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-proje...@googlegroups.com.
>>> To post to this group, send email to ansible...@googlegroups.com.
>>
>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/0b1d35ea-aaf9-4cb6-926e-390ee6dfb952%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1dc3552f-e133-4e6c-a244-9a75fb56f3c6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2Boyv2cAiXbE8h%2Bia2b6tF%2BmcKGRK3EASG-rNDne5fj6Txu--g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Unable to connect to zabbix server

2018-05-01 Thread Jeremie Levy
Anyone please ? 

On Sunday, April 29, 2018 at 3:27:40 PM UTC+3, Jeremie Levy wrote:
>
> Hi
> Trying to send request to my internal zabbix server and i get this error - 
> if anyone knows how to fix it.
>
> # pip list |grep zabbix
> zabbix-api0.5.3
>
>
>
> # ansible-playbook qb-agent-fw.yml --limit hasgqba025.DOMAIN -
> ansible-playbook 2.5.0   
>   
>   config file = /ansible/scripts/ansible.cfg 
> 
>   configured module search path = [u
> '/usr/local/lib/python2.7/dist-packages/ara/plugins/modules'] 
>  
>   ansible python module location = /usr/lib/python2.7/dist-packages/ansible 
>
>   executable location = /usr/bin/ansible-playbook 
>  
>   python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 
> 20160609]
> Using /ansible/scripts/ansible.cfg as config file 
>
> setting up inventory plugins   
> 
> Parsed /ansible/scripts/inventory/windows.yml inventory source with yaml 
> plugin  
> Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2
> .7/dist-packages/ansible/plugins/callback/default.pyc
> Loading callback plugin ara of type notification, v2.0 from /usr/local/lib
> /python2.7/dist-packages/ara/plugins/callbacks/log_ara.pyc   
>
>
> TASK [common : add host to zabbix server] 
> **
> task path: /nfs/iil/disks/eis/ansible/scripts/roles/common/tasks/zabbix.
> yml:2 
> 
>   
> Using module file /usr/lib/python2.7/dist-packages/ansible/modules/
> monitoring/zabbix/zabbix_host.py 
> 
> 
>  ESTABLISH LOCAL CONNECTION FOR USER: sys_ansible 
> 
> 
>
>  EXEC /bin/sh -c 'echo ~ && sleep 0'   
> 
> 
>   
>  EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo 
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281
>  
> `" && echo ansible-tmp-1524991995.58-156273026676281="` echo 
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281
>  
> `" ) && sleep 0' 
> 
> 
>   
>  PUT /nfs/site/home/sys_ansible/.ansible/tmp/ansible-local-
> 37581eafvWL/tmpU8jpCH TO /nfs/site/home/sys_ansible/.ansible/tmp/ansible-
> tmp-1524991995.58-156273026676281/zabbix_host.py 
> 
>  EXEC /bin/sh -c 'chmod u+x 
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/
>  
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/zabbix_host.py
>  
> && sleep 0'  
>  EXEC /bin/sh -c '/usr/bin/python 
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/zabbix_host.py
>  
> && sleep 0'   
> 
>  EXEC /bin/sh -c 'rm -f -r 
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/
>