Compare commits
2 commits
1d6d1094bc
...
dea66771e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
dea66771e0 |
|||
|
9afbc71801 |
3 changed files with 16 additions and 4 deletions
|
|
@ -3,3 +3,6 @@ collections:
|
||||||
- name: debops.debops
|
- name: debops.debops
|
||||||
version: ">=3.1.0"
|
version: ">=3.1.0"
|
||||||
source: https://galaxy.ansible.com
|
source: https://galaxy.ansible.com
|
||||||
|
- name: community.sops
|
||||||
|
version: ">=2.2.4"
|
||||||
|
source: https://galaxy.ansible.com
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,15 @@
|
||||||
- name: ensure dependencies are installed
|
- name: ensure dependencies are installed
|
||||||
|
block:
|
||||||
|
- name: ensure apt dependencies are installed
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: virtualenv
|
name: virtualenv
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: ensure SOPS is installed
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: community.sops.install
|
||||||
|
|
||||||
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-upgrading-ansible-with-pip
|
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-upgrading-ansible-with-pip
|
||||||
# https://www.redhat.com/en/blog/python-venv-ansible
|
# https://www.redhat.com/en/blog/python-venv-ansible
|
||||||
- name: ensure Ansible installation exists
|
- name: ensure Ansible installation exists
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ OnFailure=ansible-pull-failure-notify.service
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
Environment="SOPS_AGE_KEY_FILE=/etc/ansible_pull_secrets/age_private_key"
|
Environment="SOPS_AGE_KEY_FILE=/etc/ansible_pull_secrets/age_private_key"
|
||||||
|
ExecStartPre=/usr/bin/bash -c 'if [ ! -e /home/chaos/ansible_pull_checkout ]; then git clone --depth 1 "{{ ansible_pull__repo_url }}" /home/chaos/ansible_pull_checkout ; fi'
|
||||||
|
ExecStartPre=/usr/local/lib/ansible_pull_venv/bin/ansible-galaxy role install -r /home/chaos/ansible_pull_checkout/requirements.yml
|
||||||
|
ExecStartPre=/usr/local/lib/ansible_pull_venv/bin/ansible-galaxy collection install -r /home/chaos/ansible_pull_checkout/requirements.yml
|
||||||
ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
|
ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
|
||||||
--directory /home/chaos/ansible_pull_checkout \
|
--directory /home/chaos/ansible_pull_checkout \
|
||||||
--clean \
|
--clean \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue