Initial commit of PVC Ansible role
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Ansible fact - dhcp_status
|
||||
# {{ ansible_managed }}
|
||||
DHCP_STATUS="$( grep -o 'dhcp' /etc/network/interfaces | uniq )"
|
||||
echo "\"${DHCP_STATUS}\""
|
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Ansible fact - host_group
|
||||
# {{ ansible_managed }}
|
||||
HOST_GROUP="$( hostname -s | sed 's/[0-9]*//g' )"
|
||||
echo "\"${HOST_GROUP}\""
|
8
roles/base/templates/etc/ansible/facts.d/host_id.fact.j2
Normal file
8
roles/base/templates/etc/ansible/facts.d/host_id.fact.j2
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Ansible fact - host_id
|
||||
# {{ ansible_managed }}
|
||||
HOST_ID="$( hostname -s | grep -o '[0-9]\+' )"
|
||||
if [[ -z ${HOST_ID} ]]; then
|
||||
HOST_ID="0"
|
||||
fi
|
||||
echo "\"${HOST_ID}\""
|
Reference in New Issue
Block a user