wip: ansible pull
This commit is contained in:
parent
968308eeeb
commit
243a27b01c
6 changed files with 68 additions and 3 deletions
34
roles/ansible_pull/tasks/main.yaml
Normal file
34
roles/ansible_pull/tasks/main.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
- name: ensure dependencies are installed
|
||||
ansible.builtin.apt:
|
||||
name: virtualenv
|
||||
state: present
|
||||
become: true
|
||||
|
||||
# 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
|
||||
- name: ensure Ansible installation exists
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- ansible
|
||||
- jmespath
|
||||
state: present
|
||||
virtualenv: /usr/local/lib/ansible_pull_venv
|
||||
become: true
|
||||
|
||||
- name: ensure secrets directory exists
|
||||
ansible.builtin.file:
|
||||
path: /etc/ansible_pull_secrets
|
||||
state: directory
|
||||
mode: "0750"
|
||||
owner: root
|
||||
group: "{{ ansible_pull__user }}"
|
||||
become: true
|
||||
|
||||
- name: ensure age private key is deployed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ ansible_pull__age_private_key }}"
|
||||
dest: /etc/ansible_pull_secrets/age_private_key
|
||||
mode: "0640"
|
||||
owner: root
|
||||
group: "{{ ansible_pull__user }}"
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue