]> Untitled Git - lemmy.git/commitdiff
Adding become to ansible from command line instead.
authorDessalines <tyhou13@gmx.com>
Wed, 4 Sep 2019 19:54:23 +0000 (12:54 -0700)
committerDessalines <tyhou13@gmx.com>
Wed, 4 Sep 2019 19:54:23 +0000 (12:54 -0700)
README.md
ansible/lemmy.yml
docker/dev/deploy.sh

index 22e39b7db109a94370d91bd63e495e229d8ad9f1..8d078abc089730c7785cad44d0d09b6ab8b08683 100644 (file)
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ git clone https://github.com/dessalines/lemmy.git
 cd lemmy/ansible/
 cp inventory.example inventory
 nano inventory # enter your server, domain, contact email
-ansible-playbook lemmy.yml
+ansible-playbook lemmy.yml --become
 ```
 
 ## Develop
index 456932ef3b7a3f35828d4a19c09877e4639a86ea..4ba80e90a4686a423e7ec75ceee134be8819a675 100644 (file)
@@ -6,7 +6,6 @@
   gather_facts: False
   pre_tasks:
     - name: install python for Ansible
-      become: true
       raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal python-setuptools)
       args:
         executable: /bin/bash
 
   tasks:
   - name: install dependencies
-    become: true
     apt:
       pkg: ['nginx', 'docker-compose', 'docker.io', 'certbot', 'python-certbot-nginx']
 
   - name: request initial letsencrypt certificate
-    become: true
     command: certbot certonly --nginx --agree-tos -d '{{ domain }}' -m '{{ letsencrypt_contact_email }}'
     args:
       creates: '/etc/letsencrypt/live/{{domain}}/privkey.pem'
 
   - name: create lemmy folder
-    become: true
     file: path={{item.path}} state=directory
     with_items:
       - { path: '/lemmy/' }
       - { path: '/lemmy/volumes/' }
 
   - name:  add all template files
-    become: true
     template: src={{item.src}} dest={{item.dest}}
     with_items:
       - { src: 'templates/env', dest: '/lemmy/.env' }
@@ -45,7 +40,6 @@
       jwt_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/jwt chars=ascii_letters,digits') }}"
 
   - name: set env file permissions
-    become: true
     file:
       path: "/lemmy/.env"
       state: touch
       modification_time: preserve
 
   - name: enable and start docker service
-    become: true
     systemd:
       name: docker
       enabled: yes
       state: started
 
   - name: start docker-compose
-    become: true
     docker_compose:
       project_src: /lemmy/
       state: present
       pull: yes
 
   - name: reload nginx with new config
-    become: true
     shell: nginx -s reload
 
   - name: certbot renewal cronjob
-    become: true
     cron:
       special_time=daily
       name=certbot-renew-lemmy
index e7ab706ffec8a9054b1e4ea59eedc6adf2ec3aa1..edceaa9039e44273113639b3942da6697dfcb56f 100755 (executable)
@@ -28,4 +28,4 @@ docker push dessalines/lemmy:$new_tag
 
 # Pushing to any ansible deploys
 cd ../../ansible
-ansible-playbook lemmy.yml
+ansible-playbook lemmy.yml --become