roles/common: Set Install packages for vault auditd
This commit is contained in:
parent
a8ba61fe96
commit
016d1ff5d0
@ -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"
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user