From 694561cd8d826026ba822bf32b1b579955f45003 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Mon, 24 Apr 2023 20:56:37 -0500 Subject: [PATCH] clean up acg content future experimentation will occur within the existing structure --- Vagrantfile | 40 -------------------- salt_content/local/salt/acg/.gitkeep | 0 salt_content/local/salt/acg/top.sls | 4 -- salt_content/local/salt/acg/users/groups.sls | 3 -- salt_content/local/salt/acg/users/init.sls | 3 -- salt_content/local/salt/acg/users/map.jinja | 8 ---- salt_content/local/salt/acg/users/user.sls | 13 ------- 7 files changed, 71 deletions(-) delete mode 100644 salt_content/local/salt/acg/.gitkeep delete mode 100644 salt_content/local/salt/acg/top.sls delete mode 100644 salt_content/local/salt/acg/users/groups.sls delete mode 100644 salt_content/local/salt/acg/users/init.sls delete mode 100644 salt_content/local/salt/acg/users/map.jinja delete mode 100644 salt_content/local/salt/acg/users/user.sls diff --git a/Vagrantfile b/Vagrantfile index 2f0ac8e..6ab3512 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -130,46 +130,6 @@ grains: roles: - saltlab - web -EOF - systemctl restart salt-minion - SHELL - end - config.vm.define "app01" do |app01| - app01.vm.box = "peru/ubuntu-20.04-server-amd64" - app01.vm.hostname = "app01" - app01.vm.network "private_network", ip: "192.168.100.131" - app01.vm.provision "shell", inline: <<-SHELL - apt-get update - apt-get install curl -y - curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io - sh bootstrap-salt.sh -A 192.168.100.120 -U - cat << EOF > /etc/salt/minion.d/grains.conf -grains: - roles: - - acglab -EOF - systemctl restart salt-minion - SHELL - end - config.vm.define "db-users" do |dbusers| - dbusers.vm.box = "generic/rocky9" - dbusers.vm.hostname = "db-users" - dbusers.vm.network "private_network", ip: "192.168.100.132" - dbusers.vm.provision "shell", inline: <<-SHELL - echo -n "> Waiting for network..." - while ! host bootstrap.saltproject.io >/dev/null; do - echo -n "." - sleep 1 - done - echo "Proceeding!" - curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io - # workaround for EL > 9 (https://github.com/saltstack/salt-bootstrap/issues/1903) - sh bootstrap-salt.sh -A 192.168.100.120 -U -P -x python3 onedir - systemctl enable salt-minion - cat << EOF > /etc/salt/minion.d/grains.conf -grains: - roles: - - acglab EOF systemctl restart salt-minion SHELL diff --git a/salt_content/local/salt/acg/.gitkeep b/salt_content/local/salt/acg/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/salt_content/local/salt/acg/top.sls b/salt_content/local/salt/acg/top.sls deleted file mode 100644 index 30a1210..0000000 --- a/salt_content/local/salt/acg/top.sls +++ /dev/null @@ -1,4 +0,0 @@ -acg: - 'os:Ubuntu': - - match: grain - - users diff --git a/salt_content/local/salt/acg/users/groups.sls b/salt_content/local/salt/acg/users/groups.sls deleted file mode 100644 index 3276933..0000000 --- a/salt_content/local/salt/acg/users/groups.sls +++ /dev/null @@ -1,3 +0,0 @@ -create_group_qa: - group.present: - - name: qa diff --git a/salt_content/local/salt/acg/users/init.sls b/salt_content/local/salt/acg/users/init.sls deleted file mode 100644 index 39eea66..0000000 --- a/salt_content/local/salt/acg/users/init.sls +++ /dev/null @@ -1,3 +0,0 @@ -include: - - users.groups - - users.user diff --git a/salt_content/local/salt/acg/users/map.jinja b/salt_content/local/salt/acg/users/map.jinja deleted file mode 100644 index cc56553..0000000 --- a/salt_content/local/salt/acg/users/map.jinja +++ /dev/null @@ -1,8 +0,0 @@ -{% set users = salt['grains.filter_by']({ - 'Debian': { - 'sudo_group': 'sudo', - }, - 'RedHat': { - 'sudo_group': 'wheel', - }, -}) %} diff --git a/salt_content/local/salt/acg/users/user.sls b/salt_content/local/salt/acg/users/user.sls deleted file mode 100644 index 88dae8e..0000000 --- a/salt_content/local/salt/acg/users/user.sls +++ /dev/null @@ -1,13 +0,0 @@ -{% from "users/map.jinja" import users with context %} - -create_user_jbyers: - user.present: - - name: jbyers - - fullname: John Byers - - shell: /bin/bash - - home: /home/jbyers - - groups: - - {{ users.sudo_group }} - - qa - - require: - - group: qa