# HG changeset patch # User Luke Hoersten # Date 1579555593 21600 # Node ID d4924111ce28623a4252489bb88ddb69d9624bec # Parent d1406d67c758c7d7ad4b17954ee6cd0973f55760 Made pleroma roles idempotent. diff -r d1406d67c758 -r d4924111ce28 roles/nginx/tasks/main.yaml --- a/roles/nginx/tasks/main.yaml Mon Jan 20 14:19:05 2020 -0600 +++ b/roles/nginx/tasks/main.yaml Mon Jan 20 15:26:33 2020 -0600 @@ -18,7 +18,7 @@ - name: install certbot in nginx become: yes command: "certbot certonly --nginx -n --agree-tos -d {{nginx_server_name}} -m {{nginx_admin_email}}" - notify: restart nginx + changed_when: false when: nginx_enable_certbot - name: disable default site diff -r d1406d67c758 -r d4924111ce28 roles/pleroma-otp/tasks/main.yaml --- a/roles/pleroma-otp/tasks/main.yaml Mon Jan 20 14:19:05 2020 -0600 +++ b/roles/pleroma-otp/tasks/main.yaml Mon Jan 20 15:26:33 2020 -0600 @@ -40,19 +40,20 @@ - "{{pleroma_data_dir}}/{{pleroma_instance}}/static/emoji" - name: install pleroma db schema file + become: yes template: src: "setup_db.psql.j2" - dest: "/tmp/setup_db.psql" + dest: "/tmp/setup_db_{{pleroma_instance}}.psql" owner: "{{pleroma_db_superuser}}" group: "{{pleroma_db_superuser}}" mode: "0600" - become: yes + changed_when: false - name: install pleroma psql become: yes become_user: "{{pleroma_db_superuser}}" - command: "psql -f /tmp/setup_db.psql" - notify: restart pleroma instance + command: "psql -f /tmp/setup_db_{{pleroma_instance}}.psql" + changed_when: false - name: download and unarchive pleroma release become: yes @@ -98,4 +99,4 @@ chdir: "/opt/pleroma/" environment: PLEROMA_CONFIG_PATH: "/etc/pleroma/{{pleroma_instance}}.config.exs" - notify: restart pleroma instance + changed_when: false