become: true
- name: Obtain a certificate for {{ item.certificate }}
command: |
- certbot certonly --keep-until-expiring --nginx --agree-tos \
+ /usr/bin/certbot certonly --keep-until-expiring --nginx --agree-tos \
--cert-name {{ item.certificate }} --email {{ item.email }} \
--non-interactive --domains {{ item.domains | join(',') }}
args:
state: directory
become: true
- name: Download {{ item.name }} to {{ item.dest }}
- command: python3 -m gdrive_knife download --token {{ auth_token }} \
+ command: /usr/bin/python3 -m gdrive_knife download --token {{ auth_token }} \
--key {{ encryption_key }} {{ item.name }} {{ item.dest }}
args:
creates: "{{ item.dest }}/{{ item.name }}"
patterns: "*.yaml"
recurse: true
register: post_receive_scripts
- - shell: ansible-playbook --connection=local {{ item.path }}
+ - name: Execute configuration playbook
+ shell: /usr/bin/ansible-playbook --connection=local {{ item.path }}
with_items: "{{ post_receive_scripts.files }}"
- name: Restart postgresql
service:
state: restarted
become: yes
- name: Restore database from backup
- command: psql --username=postgres --file=/tmp/database
+ command: /usr/bin/psql --username=postgres --file=/tmp/database
- include_tasks: install/ssh_public_keys.yaml
with_items: "{{ users }}"