How to replace /etc/nginx/nginx.conf inside AWX ?

I want o change the Timeout* uwsgi_read_timeout 120s*; to *uwsgi_read_timeout 
600s;*
please suggest.
On Wednesday, October 30, 2013 at 10:41:23 AM UTC-7 James Cammarata wrote:

> The only other suggestion I had would be, if the git repo mirrors the 
> /etc/nginx/ directory, you could just do the git checkout to that directory:
>
> ---
> - hosts: nginx
>   tasks:
>   - name: clone nginx config
>     git: repo=git://foosball.example.org/path/to/repo.git dest=/etc/nginx
>
> That way it's just one step. You'd probably also want to add a handler 
> notification to that, so nginx would be restarted if the git repository 
> were updated.
>
>
> On Wed, Oct 30, 2013 at 8:35 AM, Timothy Gerla <[email protected]> wrote:
>
>> You could do this one of two ways, both with a single playbook. The first 
>> method would use two plays, one local play to check out the configuration 
>> once, and a second play that operates on the nginx hosts and copies:
>>
>> (I didn't test this playbook, FYI)
>>
>> ---
>> - hosts: local
>>   connection: local
>>   tasks:
>>
>>   - name: git clone to the ansible server
>>     git: repo=git://foosball.example.org/path/to/repo.git 
>> dest=/tmp/checkout
>>
>> - hosts: nginx-hosts
>>   tasks:
>>
>>   - name: copy files to target hosts
>>     copy: src=/tmp/checkout/nginx.conf dest=/etc/nginx/
>>
>>
>> Another way would be to just run the git clone on the target boxes, and 
>> move the files into place:
>>
>> ---
>> - hosts: nginx
>>   tasks:
>>
>>   - name: git clone to the target servers
>>     git: repo=git://foosball.example.org/path/to/repo.git 
>> dest=/tmp/checkout
>>
>>   - name: copy the nginx config file into place
>>     command: cp /tmp/checkout/nginx.conf /etc/nginx/nginx.conf 
>> creates=/etc/nginx.conf
>>
>>
>> Something like that should do the trick.
>>
>> -Tim
>>
>>
>> On Wed, Oct 30, 2013 at 2:21 AM, steve flitcroft <[email protected]> 
>> wrote:
>>
>>> Hi, I am new to awx and ansible. Could someone show me the best way to 
>>> pull the latest nginx conf file from a git repo and deploy across a cluster 
>>> of nginx boxes. Do I have to clone the repo to the ansible server then do a 
>>> copy task to all hosts and a notify task to restart nginx? Can I do this in 
>>> a single job template? Any examples welcome.
>>>
>>> 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 [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Tim Gerla
>> [email protected]
>>
>> -- 
>> 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 [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
>
> James Cammarata <[email protected]>
> Sr. Software Engineer, AnsibleWorks, Inc.
> http://www.ansibleworks.com/ 
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2d181071-93eb-451e-9466-9b91093128f6n%40googlegroups.com.

Reply via email to