This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path "pki/sign/mdb-lab-dot-com" { | |
capabilities = ["create", "update"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources: | |
Cloud_Ansible_Tower_1: | |
type: Cloud.Ansible.Tower | |
metadata: | |
layoutPosition: | |
- 0 | |
- 0 | |
properties: | |
host: '${resource.Cloud_vSphere_Machine_1.*}' | |
account: NL-UTC-P-ANS-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description="HashiCorp Vault Agent" | |
Documentation=https://www.vaultproject.io/docs/ | |
Requires=network-online.target | |
After=network-online.target | |
ConditionFileNotEmpty=/vault-agent/vault-agent.hcl | |
StartLimitIntervalSec=60 | |
StartLimitBurst=3 | |
[Service] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if ansible_os_family == "Windows" %} | |
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_ip_addresses[0] }}"{% raw %} }}{% endraw %} | |
{% elif ansible_os_family == "RedHat" %} | |
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_default_ipv4.address }}"{% raw %} }}{% endraw %} | |
{% endif %} | |
{% raw %} | |
{{ .Data.certificate }} | |
{{ end }} | |
{% endraw %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if ansible_os_family == "Windows" %} | |
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_ip_addresses[0] }}"{% raw %} }}{% endraw %} | |
{% elif ansible_os_family == "RedHat" %} | |
{% raw %}{{ with secret "pki/issue/mdb-lab-dot-com" "ttl=86400s" {% endraw %}"common_name={{ ansible_fqdn }}" "ip_sans={{ ansible_default_ipv4.address }}"{% raw %} }}{% endraw %} | |
{% endif %} | |
{% raw %} | |
{{ .Data.private_key }} | |
{{ end }} | |
{% endraw %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pid_file = "/vault-agent/agent.pid" | |
vault { | |
address = "{{ vault_server }}" | |
tls_skip_verify = true | |
} | |
auto_auth { | |
method "approle" { | |
config = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: Linux | |
tasks: | |
- name: Add repository | |
yum_repository: | |
name: hashicorp | |
file: hashicorp | |
description: Hashicorp Stable - $basearch | |
baseurl: https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path "pki/issue/mdb-lab-dot-com" { | |
capabilities = ["create", "update"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path "auth/approle/role/sa_vault-agent/role-id" { | |
capabilities = [ "read" ] | |
} | |
path "auth/approle/role/sa_vault-agent/secret-id" { | |
capabilities = [ "create", "update" ] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jsonData = JSON.parse(responseBody); | |
postman.setEnvironmentVariable("token", jsonData.auth.client_token); |