add VM and docker compose for concourse
This commit is contained in:
parent
4c35512e62
commit
e5a0727375
9 changed files with 107 additions and 11 deletions
15
ansible/playbooks/concourse.yml
Normal file
15
ansible/playbooks/concourse.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
- name: Install Concourse
|
||||
hosts: concourse
|
||||
|
||||
pre_tasks:
|
||||
- name: Delete externally managed environment file
|
||||
shell:
|
||||
cmd: "rm /usr/lib/python*/EXTERNALLY-MANAGED"
|
||||
register: rm
|
||||
changed_when: "rm.rc == 0"
|
||||
failed_when: "false"
|
||||
|
||||
roles:
|
||||
- {role: apt, tags: apt}
|
||||
- {role: docker, tags: docker}
|
||||
- {role: concourse, tags: concourse}
|
53
ansible/playbooks/lewis.yml
Normal file
53
ansible/playbooks/lewis.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
- name: Setup homeserver
|
||||
hosts: dataserver
|
||||
|
||||
handlers:
|
||||
- name: restart sshd
|
||||
systemd:
|
||||
name: sshd
|
||||
state: restarted
|
||||
|
||||
tasks:
|
||||
- name: Copy backup user principals file
|
||||
copy:
|
||||
dest: /etc/ssh/backup_principals
|
||||
content: hypervisor
|
||||
|
||||
- name: Copy hyp user SSH CA public key
|
||||
copy:
|
||||
dest: /etc/ssh/hyp_user.pub
|
||||
content: "{{ hyp_user_ca_public_key }}"
|
||||
|
||||
- name: Copy user certificate sshd config
|
||||
copy:
|
||||
src: "sshd_user_certificates.conf"
|
||||
dest: /etc/ssh/sshd_config.d/user_certificates.conf
|
||||
notify: restart sshd
|
||||
|
||||
- name: Ensure backup directory exists
|
||||
file:
|
||||
path: "{{ backup_mount_point }}/hosts"
|
||||
state: directory
|
||||
|
||||
- name: Create backup respositories
|
||||
command:
|
||||
cmd: "borg init -e none {{ backup_mount_point }}/hosts/{{ item }}"
|
||||
creates: "{{ backup_mount_point }}/hosts/{{ item }}"
|
||||
with_items: "{{ backup_hosts }}"
|
||||
|
||||
- name: Create extra disk moint point
|
||||
file:
|
||||
path: "{{ backup_mount_point }}"
|
||||
state: directory
|
||||
|
||||
- name: Mount extra disk
|
||||
mount:
|
||||
path: "{{ backup_mount_point }}"
|
||||
src: "UUID={{ backup_uuid }}"
|
||||
fstype: ext4
|
||||
passno: 1
|
||||
state: present
|
||||
|
||||
roles:
|
||||
- {role: apt, tags: apt}
|
||||
- {role: deploy_ssh_certificates, tags: deploy_ssh_certificates}
|
Reference in a new issue