Remove header, ensure test data is after the blockinfile header by including the tags it's looking for.
This commit is contained in:
12
setup.sh
12
setup.sh
@@ -130,17 +130,21 @@ echo "Installed!"
|
|||||||
#echo "Added!"
|
#echo "Added!"
|
||||||
|
|
||||||
# Create basic layouts if configs do not exist and are requested.
|
# Create basic layouts if configs do not exist and are requested.
|
||||||
|
|
||||||
if [[ -n "$create_general"
|
if [[ -n "$create_general"
|
||||||
|| -n "$create_workstation"
|
|| -n "$create_workstation"
|
||||||
|| -n "$create_server" ]]
|
|| -n "$create_server" ]]
|
||||||
then
|
then
|
||||||
sudo mkdir -pv "$config_dir"
|
sudo mkdir -pv "$config_dir"
|
||||||
|
MARK1="BEGIN"
|
||||||
|
MARK2="END"
|
||||||
fi
|
fi
|
||||||
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
|
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
|
||||||
function print_general_contents {
|
function print_general_contents {
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
; $MARK1 MANAGED BY ANSIBLE | Generic Config
|
||||||
|
; $MARK2 MANAGED BY ANSIBLE | Generic Config
|
||||||
; TEST DATA
|
; TEST DATA
|
||||||
[global]
|
|
||||||
enable=true
|
enable=true
|
||||||
user=test
|
user=test
|
||||||
user_desc=Test
|
user_desc=Test
|
||||||
@@ -154,8 +158,9 @@ fi
|
|||||||
if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
|
if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
|
||||||
function print_workstation_contents {
|
function print_workstation_contents {
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
; $MARK1 MANAGED BY ANSIBLE | Workstation Config
|
||||||
|
; $MARK2 MANAGED BY ANSIBLE | Workstation Config
|
||||||
; TEST DATA
|
; TEST DATA
|
||||||
[global]
|
|
||||||
enable=true
|
enable=true
|
||||||
coding=true
|
coding=true
|
||||||
editing=false
|
editing=false
|
||||||
@@ -169,8 +174,9 @@ fi
|
|||||||
if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
||||||
function print_server_contents {
|
function print_server_contents {
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
; $MARK1 MANAGED BY ANSIBLE | Server Config
|
||||||
|
; $MARK2 MANAGED BY ANSIBLE | Server Config
|
||||||
; TEST DATA
|
; TEST DATA
|
||||||
[global]
|
|
||||||
enable=true
|
enable=true
|
||||||
; TEST DATA
|
; TEST DATA
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user