Remove become: True
authorLorin Hochstein <lhochstein@netflix.com>
Mon, 16 Jan 2017 01:47:36 +0000 (17:47 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Mon, 16 Jan 2017 01:47:36 +0000 (17:47 -0800)
the xenial docker image doesn't have sudo, so become doesn't work. It runs as
root, so no need for it

ch13/ansible/roles/mezzanine/handlers/main.yml
ch13/ansible/roles/mezzanine/tasks/django.yml
ch13/ansible/roles/mezzanine/tasks/main.yml
ch13/ansible/roles/mezzanine/tasks/nginx.yml

index 0913020..137b354 100644 (file)
@@ -1,7 +1,5 @@
 ---
 - name: restart supervisor
   supervisorctl: name=gunicorn_mezzanine state=restarted
-  become: True
 - name: restart nginx
   service: name=nginx state=restarted
-  become: True
index 8a0c685..97bfa2b 100644 (file)
@@ -8,7 +8,6 @@
     - pip
     - virtualenv
     - virtualenvwrapper
-  become: True
 - name: install required python packages
   pip: name={{ item }} virtualenv={{ mezzanine_venv_path }}
   with_items:
   template: src=gunicorn.conf.py.j2 dest={{ mezzanine_proj_path }}/gunicorn.conf.py
 - name: set the supervisor config file
   template: src=supervisor.conf.j2 dest=/etc/supervisor/conf.d/mezzanine.conf
-  become: True
   notify: restart supervisor
 - name: ensure config path exists
   file: path={{ mezzanine_conf_path }} state=directory
-  become: True
   when: tls_enabled
 - name: install poll twitter cron job
   cron: >
index 975a15e..5f697f7 100644 (file)
@@ -1,7 +1,6 @@
 ---
 - name: install apt packages
   apt: pkg={{ item }} update_cache=yes cache_valid_time=3600
-  become: True
   with_items:
     - git
     - libjpeg-dev
index 1852181..5331607 100644 (file)
@@ -1,24 +1,20 @@
 - name: set the nginx config file
   template: src=nginx.conf.j2 dest=/etc/nginx/sites-available/mezzanine.conf
   notify: restart nginx
-  become: True
 - name: enable the nginx config file
   file:
     src: /etc/nginx/sites-available/mezzanine.conf
     dest: /etc/nginx/sites-enabled/mezzanine.conf
     state: link
   notify: restart nginx
-  become: True
 - name: remove the default nginx config file
   file: path=/etc/nginx/sites-enabled/default state=absent
   notify: restart nginx
-  become: True
 - name: create ssl certificates
   command: >
     openssl req -new -x509 -nodes -out {{ mezzanine_proj_name }}.crt
     -keyout {{ mezzanine_proj_name }}.key -subj '/CN={{ domains[0] }}' -days 3650
     chdir={{ mezzanine_conf_path }}
     creates={{ mezzanine_conf_path }}/{{ mezzanine_proj_name }}.crt
-  become: True
   when: tls_enabled
   notify: restart nginx