From 451ef49bbe39b629985b361c8451ba2162ebf21e Mon Sep 17 00:00:00 2001 From: Michael Gebetsroither Date: Sun, 10 Dec 2023 19:11:12 +0100 Subject: [PATCH 1/3] add iot vm for new node-red room automation --- ansible/host_vars/iot/main.yml | 42 ++++++++++++++++++++++++++++++++++ ansible/hosts.ini | 1 + 2 files changed, 43 insertions(+) create mode 100644 ansible/host_vars/iot/main.yml diff --git a/ansible/host_vars/iot/main.yml b/ansible/host_vars/iot/main.yml new file mode 100644 index 0000000..d3129d6 --- /dev/null +++ b/ansible/host_vars/iot/main.yml @@ -0,0 +1,42 @@ +--- +ssh_users_root: + - equinox + - nicoo + - gebi + +#sshd_allowusers_host: +# - ... + +# SSH configuration +## There are no individual user accounts +localconfig_ssh_config_user: root + +# VM installation +vm_host: alfred + +install: + host: "{{ vm_host }}" + mem: 2048 + numcpu: 2 + disks: + primary: /dev/vda + virtio: + vda: + vg: "{{ vm_host }}" + lv: "{{ inventory_hostname }}" + size: 10g + interfaces: + - bridge: "{{ hostvars[vm_host].vm_host.network.interface }}" + name: mgmt0 + autostart: True + +network: + nameservers: "{{ hostvars[vm_host].vm_host.network.nameservers }}" + domain: realraum.at + systemd_link: + interfaces: "{{ install.interfaces }}" + primary: + interface: mgmt0 + ip: "{{ (hostvars[vm_host].vm_host.network.ip+'/'+hostvars[vm_host].vm_host.network.mask) | ipaddr(hostvars[vm_host].vm_host.network.indices[inventory_hostname]) | ipaddr('address') }}" + mask: "{{ hostvars[vm_host].vm_host.network.mask }}" + gateway: "{{ hostvars[vm_host].vm_host.network.gateway | default(hostvars[vm_host].vm_host.network.ip) }}" diff --git a/ansible/hosts.ini b/ansible/hosts.ini index 8878b58..d74c3ea 100644 --- a/ansible/hosts.ini +++ b/ansible/hosts.ini @@ -49,6 +49,7 @@ hacksch metrics r3home testvm +iot [virtualservers-alfred:vars] vm_install_host = alfred From 78a84e5fad4b69f299e4a0401b076fdd9e2d18ec Mon Sep 17 00:00:00 2001 From: Michael Gebetsroither Date: Wed, 3 Jan 2024 21:29:45 +0100 Subject: [PATCH 2/3] iot: add hvac creds --- ansible/host_vars/iot/vault.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ansible/host_vars/iot/vault.yml diff --git a/ansible/host_vars/iot/vault.yml b/ansible/host_vars/iot/vault.yml new file mode 100644 index 0000000..1b60175 --- /dev/null +++ b/ansible/host_vars/iot/vault.yml @@ -0,0 +1,21 @@ +$ANSIBLE_VAULT;1.1;AES256 +36366135613062623139643664393161646561316437633533613932373863346264306264303435 +3933373532363431346661316165613236313739663262320a346461326231633661643836653135 +32366661346662313763316235343339343037653836323437323838646138623562623539333230 +3335313965396435640a633230393237313734613837653434653933363864376333316264653139 +62373263626538323366633832373832363733386538313235356439393936646436383832303933 +31646337633436353835323263373261343431396332353434653731653435396463656561333434 +33343033386266373361663331303461333662666336313130356565643161653033333836396666 +35633663363264323338623337306635333162353339613464343237396536636332623439623033 +31396635656435663538616335363766333738376262343030383839623130613330373365383130 +62303233363635373663663737326534386235333934656230663835306433643236303730623765 +37633130303361623334386137646633353535326337356531343166313531336266643534396362 +33376530663531653032306431383165643539356533613131326138303939313134666561613135 +62656331653830633935363662613739616435353232376438643166343535366363336561663266 +61303535373463373532353364323037663533343033363966643736326463336138633766656232 +32636236333761343261346466613432663632346265666637343035363163383037333737393835 +33366337396334633130623032613562663433323061623061303338343866346131613432326337 +37393539396665646161373532626338376637646136303832393030396332373766623438353037 +65333338313831626337303561386333356335376534323337663037373630326437646235396662 +61366235613464373064396438643161336437313635333262613533383865306438653764343038 +37616233353433643763 From 1abfce8b74d4de680cde2393661b0679229360ec Mon Sep 17 00:00:00 2001 From: Michael Gebetsroither Date: Fri, 19 Jan 2024 14:07:20 +0100 Subject: [PATCH 3/3] add hvac local access creds --- ansible/host_vars/iot/vault.yml | 61 ++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/ansible/host_vars/iot/vault.yml b/ansible/host_vars/iot/vault.yml index 1b60175..01d6bd1 100644 --- a/ansible/host_vars/iot/vault.yml +++ b/ansible/host_vars/iot/vault.yml @@ -1,21 +1,42 @@ $ANSIBLE_VAULT;1.1;AES256 -36366135613062623139643664393161646561316437633533613932373863346264306264303435 -3933373532363431346661316165613236313739663262320a346461326231633661643836653135 -32366661346662313763316235343339343037653836323437323838646138623562623539333230 -3335313965396435640a633230393237313734613837653434653933363864376333316264653139 -62373263626538323366633832373832363733386538313235356439393936646436383832303933 -31646337633436353835323263373261343431396332353434653731653435396463656561333434 -33343033386266373361663331303461333662666336313130356565643161653033333836396666 -35633663363264323338623337306635333162353339613464343237396536636332623439623033 -31396635656435663538616335363766333738376262343030383839623130613330373365383130 -62303233363635373663663737326534386235333934656230663835306433643236303730623765 -37633130303361623334386137646633353535326337356531343166313531336266643534396362 -33376530663531653032306431383165643539356533613131326138303939313134666561613135 -62656331653830633935363662613739616435353232376438643166343535366363336561663266 -61303535373463373532353364323037663533343033363966643736326463336138633766656232 -32636236333761343261346466613432663632346265666637343035363163383037333737393835 -33366337396334633130623032613562663433323061623061303338343866346131613432326337 -37393539396665646161373532626338376637646136303832393030396332373766623438353037 -65333338313831626337303561386333356335376534323337663037373630326437646235396662 -61366235613464373064396438643161336437313635333262613533383865306438653764343038 -37616233353433643763 +38636639306132346662393934636139306437643030363138346634373038636466616637313462 +6433386564633934333433613962356437333731656365370a356166623330323438313432376233 +38386131326435313536633730666238643637653961326661626230353339323463306337366362 +3137666461633566610a656233376135396663346237343435616538636334303563363762663034 +66336637636133316366626539353063353263376664346165636435643433376630356664303330 +30623237613564616366656161343463616136313137616163666263626331383265323837323034 +32396435306338653766316565396365326562656334643464336534303662356565653465303831 +32383130333839376135663639333236303838306539333132313061366136663837313139373863 +31613434396438303763646330383337346664636130396532616435626536643435363530343264 +63376161646235386361623565393234393032353934363666326561646631653331363862306139 +34323534343630343162633865623064353461653365303735353334316461333466363431616632 +61333234363534633732383031363033383734383238623466626162313230383137616266633565 +31313066343765626634356138626466613239303765376334353434303664323538386136336363 +65306633386430306435623136653332316239376232363139323066303632393162393236656331 +36393632333139303236373433643634393763396131386133653030643130653165373130376566 +66613862363165643166663735343130366535303438623834366361666238353836636430363432 +34373139373937353764633564326165633165363539636364323865323430353630393937333233 +65623839643564346330383162653161366466613464356532666437373039353162313030356630 +39393732643332323666303164626431343231323664343134626462353063356539613034326364 +31633138333234393862613338323831356662303538303035356233396431656261313264636336 +61363638313764393761636432353336316333656263663965363036363336313931643130663833 +32636530393131633962636463613634633632386634393532353262616538643135393131313863 +38393165343638333361313665393633646563343565303466363332613138653735333335383436 +31636566343465363137643061633038346436313831626665393838303036323336643736313036 +33373666333836333135346632633335653331613933663061626539386436366237616631343766 +33393431646562643838306266396335626166623531363962653761376461633462633836383362 +32626266326564313735333132616230613638636134343261396263646166356239353230373737 +66643238643934313533366565306332333239386230323335623235613136663737656333663365 +37333139656532333032363534326161313264356665646131396339636433323763613432653864 +38333161656232663332643334646365343632396534323463643634356631663633663138613264 +63653936313838646537323835666535333265316632383263333038343132626239353638633064 +38383330316663643265616531633766363237643739663762653236656166663866663030363633 +37616230303761633433383437356335383364366566643765383165373565363862353631366464 +32376537313137333838373434373666303962663264653739663739666139323830373834383961 +34633066353731366633616639663738633236343936313663313131383636393131306338383763 +34303662303039326636656464303635626234376334656631323536323264613831353530396136 +31363037613630326530343037643932616635383764333934376266623036323666363765383435 +32333033623636323163383730363565336132653063313265616261333730323633386261626131 +35363262373464366364383630316334376539303731633738316165386139336334613231663265 +35396132663763636237356533623337393763353464376332643865363064303462616231656235 +3862