github.com/wanliu/go-oauth2-server@v0.0.0-20180817021415-f928fa1580df/ansible/roles/web/tasks/copy_code.yml (about)

     1  ---
     2  # These tasks are responsible for copying the latest dev/production code from
     3  # the version control system.
     4  
     5  - name: Ensures dir exists
     6    file:
     7      path: /usr/src/app/oauth2-server
     8      state: directory
     9      owner: ec2-user
    10      group: ec2-user
    11    become: yes
    12  
    13  - name: Copy the code from repository
    14    unarchive:
    15      copy: yes
    16      src: "{{playbook_dir}}/../build/oauth2-server.zip"
    17      dest: /usr/src/app/oauth2-server
    18      owner: ec2-user
    19      group: ec2-user
    20    become: yes
    21    notify:
    22      - kill oauth2-server
    23      - start oauth2-server
    24  
    25