[ansible-project] Re: ecs_taskdefinition module not creating new revision

2016-10-05 Thread Gallo
Did you find an answer im having the same issue. 

On Thursday, June 30, 2016 at 12:38:14 PM UTC-4, Niko Ruotsalainen wrote:
>
> Hi,
>
> I'm trying to use ecs_taskdefinition module to create task definitions to 
> ECS.
>
> I'm using example from 
> https://docs.ansible.com/ansible/ecs_taskdefinition_module.html
>
> ---
>
> - hosts: localhost
>   tasks:
> - name: "Create task definition"
>   ecs_taskdefinition:
> containers:
> - name: simple-app
>   cpu: 10
>   essential: true
>   image: "httpd:2.4"
>   memory: 300
>   mountPoints:
>   - containerPath: /usr/local/apache2/htdocs
> sourceVolume: my-vol
>   portMappings:
>   - containerPort: 80
> hostPort: 80
> - name: busybox
>   command:
> - "echo 'LOL'"
>   cpu: 10
>   entryPoint:
>   - sh
>   - "-c"
>   essential: false
>   image: busybox
>   memory: 200
>   volumesFrom:
>   - sourceContainer: simple-app
> volumes:
> - name: my-vol
> family: test-cluster-taskdef
> state: present
>   register: task_output
>
> - debug: var=task_output
>
>
> And output is:
>
> $ ansible-playbook playbooks/create-ecs-taskdefinition.yml
>
> PLAY [localhost] 
> ***
>
> TASK [setup] 
> ***
> ok: [localhost]
>
> TASK [Create task definition] 
> **
> ok: [localhost]
>
> TASK [debug] 
> ***
> ok: [localhost] => {
> "task_output": {
> "changed": false,
> "taskdefinition": {
> "containerDefinitions": [
> {
> "cpu": 10,
> "environment": [],
> "essential": true,
> "image": "httpd:2.4",
> "memory": 300,
> "mountPoints": [
> {
> "containerPath": "/usr/local/apache2/htdocs",
> "sourceVolume": "my-vol"
> }
> ],
> "name": "simple-app",
> "portMappings": [
> {
> "containerPort": 80,
> "hostPort": 80,
> "protocol": "tcp"
> }
> ],
> "volumesFrom": []
> },
> {
> "command": [
> "echo 'LOL'"
> ],
> "cpu": 10,
> "entryPoint": [
> "sh",
> "-c"
> ],
> "environment": [],
> "essential": false,
> "image": "busybox",
> "memory": 200,
> "mountPoints": [],
> "name": "busybox",
> "portMappings": [],
> "volumesFrom": [
> {
> "sourceContainer": "simple-app"
> }
> ]
> }
> ],
> "family": "test-cluster-taskdef",
> "revision": 1,
> "status": "ACTIVE",
> "taskDefinitionArn": 
> "arn:aws:ecs:eu-west-1:123456789012:task-definition/test-cluster-taskdef:1",
> "volumes": [
> {
> "host": {},
> "name": "my-vol"
> }
> ]
> }
> }
> }
>
> PLAY RECAP 
> *
> localhost  : ok=3changed=0unreachable=0failed=0
>
> So far all good. But when I run script again, it does not create new 
> revision of task definition what I would expect to happen and output is 
> exactly the same. Am I missing something or is this some kind of bug?
>
> $ ansible --version
> ansible 2.1.0.0
>
> I also tried creating task definition with AWS CLI and it work as 
> expected. Second run create new revision of task definition. So thats why 
> I'm asking this question here.
>
> BR,
> Niko
>
>

-- 
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/e3695601-bc9c-4ad7-9d12-290a1c5c29dd%40googlegroups.com.
For more options, visit

[ansible-project] How to configure Vyatta router using ansible 2.0 version?

2016-10-05 Thread Mick st john
I am trying to configure vyatta router using modules provided by ansible 
2.0 version. However, the commands such as "configure" are not supported by 
shell module as it is the configure command is not executed from /bin/sh. 
I am aware of the fact that ansible latest version 2.2 has a "vyos" module 
which supports vyatta configuration. But, what can I do to make it possible 
for me to configure vyatta router using modules provided in 2.0 version?


-- 
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/7b1d19ea-58be-4564-a63b-a3480d1dab06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How can i push locally created branch on a repository to origin via Ansible

2016-10-05 Thread ishan jain
I found a single GIT command to do that.

git push origin  --repo https://username:p...@repourl.com

On Tuesday, 4 October 2016 22:51:34 UTC+2, Alexander H. Laughlin wrote:
>
> I think something like the below would work to solve your problem with the 
> variable interpolation.
>
> - name: Push git commits with local variables.
>
>   hosts: localhost
>
>   vars:
>
> username: git_username
>
> password: git_password
>
>   tasks:
>
> - name: Set origin to include username and password.
>
>   shell: "git remote set-url origin https://{{ git_username }}:{{ 
> git_password }}@yourhost.com/storage/repo.git"
>
> - name: Push to origin.
>
>   shell: "git push origin branch"
>
> That is, if you can safely transmit the passwords via https. If you're 
> using http this would be incredibly unsafe. 
>
> You could also look at setting the credential.helper variable in git (`git 
> config --global credential.helper store`), but that's beyond the scope of 
> this mailing list.
>
> On Tuesday, October 4, 2016 at 8:21:37 AM UTC-7, ishan jain wrote:
>>
>> Seems like there is isn't any module in Ansible which can commit back to 
>> a GIT repo. My case is such that i am allowing the user to create a new 
>> branch in any of our several repositories and with the help of templates, 
>> generate some necessary files, all this via ansible. I am able to clone the 
>> repo (even a branch/tag) via GIT module, create a new branch with shell 
>> module, populate it with templates, but now i need to push the new branch 
>> and its contents and this is where i am stuck. GIT push would prompt for 
>> username and password which is something i have in the variables but don't 
>> know how to use in Ansible shell command. Any ideas how to proceed here ?
>>
>

-- 
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/1bf186f4-cbf4-4d8d-b9e8-b6e961b70767%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.