Re: [ansible-project] cant install dependencies for mysql and flask

2019-04-16 Thread Sascha Andres
Hi,

depending on your distribution the packages might have a different name.
Have you tried installing python-dev manually. It might be named
python2-dev.

Kind regards,
Sascha

On Tue, Apr 16, 2019 at 11:13 PM AQ  wrote:

> [test@ip-172-31-1-143 ~]$ ansible-playbook
> /home/test/AQ-Project2/playbook.yml -i /home/test/AQ-Project2/inventory.txt
>
> PLAY [Deploy a web application]
> 
>
> TASK [Gathering Facts]
> *
> ok: [db_and_web_server]
>
> TASK [Install dependencies]
> 
> failed: [db_and_web_server] (item=[u'python', u'python-setuptools',
> u'python-dev', u'build-essential', u'python-pip', u'python-mysqldb']) =>
> {"changed": false, "failed": true, "item": ["python", "python-setuptools",
> "python-dev", "build-essential", "python-pip", "python-mysqldb"], "msg":
> "No package matching 'python-dev' found available, installed or updated",
> "rc": 126, "results": ["python-2.7.14-58.amzn2.0.4.x86_64 providing python
> is already installed", "python2-setuptools-38.4.0-3.amzn2.0.6.noarch
> providing python-setuptools is already installed", "No package matching
> 'python-dev' found available, installed or updated"]}
> to retry, use: --limit @/home/test/Anas-Project2/playbook.retry
>
> PLAY RECAP
> *
> db_and_web_server  : ok=1changed=0unreachable=0failed=1
>
> --
> 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/44374cf9-87c5-46e4-bc4e-9017a7543f63%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/CADYNs%2BMA1-od53HZJXHqo%3DPY%2B3j5jRcC%2B5iQF7opbdQ6dSZVeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible inventory organization

2019-03-25 Thread Sascha Andres
Hi,

thanks Steve, this is what I was looking for. I have found intersection in 
the configs now.

Thanks again,
Sascha

On Monday, March 25, 2019 at 1:47:28 PM UTC+1, Steve R wrote:
>
> If you want an intersection, try: 
>
> ansible-playbook --limit production:\ 
>
> Or if you just want to run on "servera" and "serverb", you can do it like 
> this: 
>
> ansible-playbook --limit ~server[ab] 
>
> --Steve 
>
> On Mon, Mar 25, 2019 at 7:24 AM Sascha Andres  > wrote: 
> > 
> > Hi, 
> > 
> > maybe to be clearer: I want the intersection of production & www. 
> > 
> > Kind regards, 
> > Sascha 
> > 
> > -- 
> > 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/8f849cde-abf8-40a5-b80b-fddfef02149b%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/2737a8b3-20b3-4e07-95a2-7dd24f729d95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible inventory organization

2019-03-25 Thread Sascha Andres
Hi,

maybe to be clearer: I want the intersection of production & www.

Kind regards,
Sascha

-- 
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/8f849cde-abf8-40a5-b80b-fddfef02149b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible inventory organization

2019-03-25 Thread Sascha Andres
Hi,

I have servers that are organized into environment (such as staging, 
production, test, etc.) and into function (www, db, etc)

My idea was to have a group 'production' with a list of servers, and a 
group www with a list of servers. Just like this:


production:
  hosts:
servera
serverb

test:
  hosts:
serverc
serverd

www:
  hosts:
servera
serverb
serverc
serverd

Not I want something like
ansible-playbook --limit production,www 

and I want it applied only to servera and serverb. Not sure how to get 
there. Can anyone give a hint?

Kind regards,
Sascha

-- 
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/0221cb0a-8b85-478d-b55b-615799542735%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: group_vars produces error

2016-02-24 Thread Sascha Andres
I have. it seems related to [v2] 'Timeout (12s) waiting for privilege 
escalation prompt' when using with_items for commands that last longer than 
12 seconds 

The fix does not seem to made it's way to 2.0.0.2 release

-- 
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/1355f273-a9e7-4e82-91b1-c9d93576b78d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: group_vars produces error

2016-02-12 Thread Sascha Andres
When switching to root it works, using a user having sudo rights with 
NOPASSWD it does not work

On Wednesday, February 10, 2016 at 3:27:46 PM UTC+1, Sascha Andres wrote:
>
> Hello,
>
> I have two machines both running ansible 2.0.0.2 on Ubuntu 14.04.3 LTS. On 
> one machine ( my work machine )
> the yaml file works well while on the deployment server it throws an error 
> "ERROR! failed to combine variables, expected dicts but got a 'dict' and a 
> 'AnsibleUnicode'"
>
> ---
>
> - hosts: docker_staging
>   vars:
>   - domain: abc.de
>   - web_port: 8008
>   - identifier: abc
>   - instance: web
>   - image_suffix: -web
>   - enc_key: 0x0
>   tasks:
>   - include: tasks/deploy.yaml
>   
> There is a group_vars/docker_staging.yaml which contains some variables:
>
> ---
> nginx_blacklist: yes
> nginx_servers:
> - {
> server_name: abc.de,
> db_name: sta_abc,
> db_pass: password,
> db_user: abc_user,
> db_host: "db.abc.de",
> listen: 80,
> ssl: off,
> proxy_pass: "localhost:8001",
> additionals: [
>   "client_max_body_size 200M;"
> ]
>   }
>   
> This worked well on my machine but has thrown the above error on the 
> deployment server. However, when I change the main.yaml to use include_vars 
> and rename group_vars to something 
> else it works:
>
> ---
>
> - hosts: docker_staging
>   vars:
>   - domain: abc.de
>   - web_port: 8008
>   - identifier: abc
>   - instance: web
>   - image_suffix: -web
>   - enc_key: 0x0
>   tasks:
>   - include_vars: application_vars/docker_staging.yaml
>   - include: tasks/deploy.yaml
>   
> This is odd behaviour. Any help on this?
>
> Kind regards,
> Sascha
>

-- 
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/e961a9a8-385f-4877-befe-e33af7274bec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] group_vars produces error

2016-02-10 Thread Sascha Andres
Hello,

I have two machines both running ansible 2.0.0.2 on Ubuntu 14.04.3 LTS. On 
one machine ( my work machine )
the yaml file works well while on the deployment server it throws an error 
"ERROR! failed to combine variables, expected dicts but got a 'dict' and a 
'AnsibleUnicode'"

---

- hosts: docker_staging
  vars:
  - domain: abc.de
  - web_port: 8008
  - identifier: abc
  - instance: web
  - image_suffix: -web
  - enc_key: 0x0
  tasks:
  - include: tasks/deploy.yaml
  
There is a group_vars/docker_staging.yaml which contains some variables:

---
nginx_blacklist: yes
nginx_servers:
- {
server_name: abc.de,
db_name: sta_abc,
db_pass: password,
db_user: abc_user,
db_host: "db.abc.de",
listen: 80,
ssl: off,
proxy_pass: "localhost:8001",
additionals: [
  "client_max_body_size 200M;"
]
  }
  
This worked well on my machine but has thrown the above error on the 
deployment server. However, when I change the main.yaml to use include_vars 
and rename group_vars to something 
else it works:

---

- hosts: docker_staging
  vars:
  - domain: abc.de
  - web_port: 8008
  - identifier: abc
  - instance: web
  - image_suffix: -web
  - enc_key: 0x0
  tasks:
  - include_vars: application_vars/docker_staging.yaml
  - include: tasks/deploy.yaml
  
This is odd behaviour. Any help on this?

Kind regards,
Sascha

-- 
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/35f70d5a-3edf-4369-a476-04ceeb0c4959%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.