mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-10-28 05:07:06 +01:00
build
This commit is contained in:
1 parent
ca8be2ac68
commit
4f679f1e41
1 file changed
+13
-9
@@ -7,6 +7,7 @@
|
|||||||
- name: Facts
|
- name: Facts
|
||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
when: ansible_facts.architecture is not defined
|
when: ansible_facts.architecture is not defined
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@@ -117,8 +118,11 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Create vault agent config
|
- name: Create vault agent config
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/vault-agent/config.hcl
|
dest: /etc/vault-agent/config.hcl
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
content: |
|
content: |
|
||||||
vault {
|
vault {
|
||||||
address = "http://vault.home.lan:8205"
|
address = "http://vault.home.lan:8205"
|
||||||
@@ -142,32 +146,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template {
|
template {
|
||||||
destination = "/home/jd/.ssh/id_ed25519-cert.pub"
|
destination = "/home/jd/.ssh/id_ed25519-cert.pub"
|
||||||
perms = "0644"
|
perms = "0644"
|
||||||
user = "jd"
|
user = "jd"
|
||||||
group = "jd"
|
group = "jd"
|
||||||
|
|
||||||
contents = <<EOH
|
contents = <<EOH
|
||||||
{{ '{{' }} with secret "ssh/sign/admin" (printf "public_key=%s" (trimSpace (file "/home/jd/.ssh/id_ed25519.pub"))) "valid_principals=jd" {{ '}}' }}
|
{{ '{{' }}- with secret "ssh/sign/admin" (printf "public_key=%s" (trimSpace (file "/home/jd/.ssh/id_ed25519.pub"))) "valid_principals=jd" -{{ '}}' }}
|
||||||
{{ '{{' }} .Data.signed_key {{ '}}' }}
|
{{ '{{' }} .Data.signed_key {{ '}}' }}
|
||||||
{{ '{{' }} end {{ '}}' }}
|
{{ '{{' }}- end -{{ '}}' }}
|
||||||
EOH
|
EOH
|
||||||
}
|
}
|
||||||
|
|
||||||
template {
|
template {
|
||||||
destination = "/home/ansible/.ssh/id_ed25519-cert.pub"
|
destination = "/home/ansible/.ssh/id_ed25519-cert.pub"
|
||||||
perms = "0644"
|
perms = "0644"
|
||||||
user = "ansible"
|
user = "ansible"
|
||||||
group = "ansible"
|
group = "ansible"
|
||||||
|
|
||||||
contents = <<EOH
|
contents = <<EOH
|
||||||
{{ '{{' }} with secret "ssh/sign/admin" (printf "public_key=%s" (trimSpace (file "/home/ansible/.ssh/id_ed25519.pub"))) "valid_principals=ansible" {{ '}}' }}
|
{{ '{{' }}- with secret "ssh/sign/admin" (printf "public_key=%s" (trimSpace (file "/home/ansible/.ssh/id_ed25519.pub"))) "valid_principals=ansible" -{{ '}}' }}
|
||||||
{{ '{{' }} .Data.signed_key {{ '}}' }}
|
{{ '{{' }} .Data.signed_key {{ '}}' }}
|
||||||
{{ '{{' }} end {{ '}}' }}
|
{{ '{{' }}- end -{{ '}}' }}
|
||||||
EOH
|
EOH
|
||||||
}
|
}
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: '0644'
|
|
||||||
|
|
||||||
- name: Create secret id file
|
- name: Create secret id file
|
||||||
copy:
|
copy:
|
||||||
|
|||||||
Reference in new issue
Block a user