diff --git a/playbook/roles/cert-manager/files/get_certificate.sh b/playbook/roles/cert-manager/files/get_certificate.sh index fd7fe170..4f375ff9 100644 --- a/playbook/roles/cert-manager/files/get_certificate.sh +++ b/playbook/roles/cert-manager/files/get_certificate.sh @@ -1,12 +1,5 @@ #!/bin/bash -sudo apt-get update -sudo apt install -y software-properties-common -curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/hashicorp-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list > /dev/null -sudo apt-get update -sudo apt-get install -y python3-pip jq vault - check_empty() { if [ -z "$1" ]; then echo "$2" diff --git a/playbook/roles/common/tasks/main.yml b/playbook/roles/common/tasks/main.yml index 4a9bfd4c..9448fe64 100755 --- a/playbook/roles/common/tasks/main.yml +++ b/playbook/roles/common/tasks/main.yml @@ -16,10 +16,16 @@ #- name: enable ip_forward # shell: 'echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf; echo "net.ipv4.conf.all.proxy_arp = 1" >> /etc/sysctl.conf ; sysctl -p /etc/sysctl.conf' -#- name: Install packages -# shell: "apt update && apt install -y auditd" -# when: (ansible_facts['distribution'] == "Ubuntu") or (ansible_facts['distribution'] == "Debian") -# +- name: Install packages + shell: | + sudo apt-get update + sudo apt install -y software-properties-common + curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list > /dev/null + sudo apt-get update + sudo apt-get install -y vault auditd + when: (ansible_facts['distribution'] == "Ubuntu") or (ansible_facts['distribution'] == "Debian") + #- name: Install packages # shell: "yum makecache && yum install -y audit container-selinux" # when: (ansible_facts['distribution'] != "Ubuntu") or (ansible_facts['distribution'] != "Debian")