feat: deployment platform
This commit is contained in:
29
playbooks/deploy.yml
Normal file
29
playbooks/deploy.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
- name: Deploy artifact to instance.
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.json
|
||||
vars:
|
||||
ansible_connection: aws_ssm
|
||||
ansible_aws_ssm_plugin: "{{ ssm_plugin }}"
|
||||
ansible_aws_ssm_bucket_name: "{{ image_bucket }}"
|
||||
ansible_aws_ssm_instance_id: "{{ instance_id.value }}"
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
ansible_aws_ssm_region: "{{ aws_region }}"
|
||||
ansible_aws_ssm_access_key_id: "{{ aws_access_key }}"
|
||||
ansible_aws_ssm_secret_access_key: "{{ aws_secret_key }}"
|
||||
tasks:
|
||||
- name: Run image.
|
||||
community.docker.docker_container:
|
||||
name: server
|
||||
image: gitea/act_runner
|
||||
state: started
|
||||
recreate: true
|
||||
restart_policy: always
|
||||
ports: [80:80, 443:443]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
env:
|
||||
GITEA_INSTANCE_URL: https://{{ subdomain }}.{{ domain }}/
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ registration_token }}"
|
||||
Reference in New Issue
Block a user