From ab6af5a01ca08c79a292ab8e7bfc06d9d9ac5d90 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Mon, 6 Nov 2017 22:55:22 +0000 Subject: [PATCH] tg-accounting site --- accounting_vdesks.yml | 40 +++++++++++++++++++ group_vars/accounting_vdesks/netif.yml | 9 +++++ group_vars/accounting_vdesks/users.yml | 13 ++++++ group_vars/accounting_vdesks/virt.yml | 1 + group_vars/all/ips.yml | 11 +++++ group_vars/all/networks.yml | 14 +++++++ group_vars/all/site.yml | 1 + group_vars/all/users.yml | 8 ++++ group_vars/virt_hosts/netif.yml | 5 +++ .../root/.local/share/fish/fish_history | 8 ++++ host_vars/tg-accounting-feripent/netif.yml | 21 ++++++++++ .../tg-accounting-feripent/ssh_host_key.yml | 1 + host_vars/tg-accounting-feripent/staging.yml | 1 + host_vars/tg-accounting-feripent/virt.yml | 21 ++++++++++ host_vars/tg-srv-2/host.yml | 1 + host_vars/tg-srv-2/netif.yml | 14 +++++++ host_vars/tg-srv-2/staging.yml | 1 + inventory | 5 +++ roles | 1 + virt_hosts.yml | 15 +++++++ 20 files changed, 191 insertions(+) create mode 100644 accounting_vdesks.yml create mode 100644 group_vars/accounting_vdesks/netif.yml create mode 100644 group_vars/accounting_vdesks/users.yml create mode 100644 group_vars/accounting_vdesks/virt.yml create mode 100644 group_vars/all/ips.yml create mode 100644 group_vars/all/networks.yml create mode 100644 group_vars/all/site.yml create mode 100644 group_vars/all/users.yml create mode 100644 group_vars/virt_hosts/netif.yml create mode 100644 host_files/tg-accounting-feripent/root/.local/share/fish/fish_history create mode 100644 host_vars/tg-accounting-feripent/netif.yml create mode 100644 host_vars/tg-accounting-feripent/ssh_host_key.yml create mode 100644 host_vars/tg-accounting-feripent/staging.yml create mode 100644 host_vars/tg-accounting-feripent/virt.yml create mode 100644 host_vars/tg-srv-2/host.yml create mode 100644 host_vars/tg-srv-2/netif.yml create mode 100644 host_vars/tg-srv-2/staging.yml create mode 100644 inventory create mode 120000 roles create mode 100644 virt_hosts.yml diff --git a/accounting_vdesks.yml b/accounting_vdesks.yml new file mode 100644 index 0000000..7da30ca --- /dev/null +++ b/accounting_vdesks.yml @@ -0,0 +1,40 @@ +--- + +- hosts: accounting_vdesks + gather_facts: false + roles: + - name: staging + default_stage: provisioning + +- hosts: accounting_vdesks:&provisioning + remote_user: root + gather_facts: false + roles: + - role: netif + - role: virt_default_profile + - role: virt_provision + - role: common + - name: staging + next_stage: staging + +- hosts: accounting_vdesks + remote_user: root + roles: + - role: common + - role: eralitex_desktop + - role: desktop_apps + - role: atom_editor + - role: accounting + +- hosts: accounting_vdesks:&staging + remote_user: root + roles: + - name: staging + next_stage: production + +- hosts: accounting_vdesks:&recycling + remote_user: root + gather_facts: false + roles: + - role: virt + virt_state: absent diff --git a/group_vars/accounting_vdesks/netif.yml b/group_vars/accounting_vdesks/netif.yml new file mode 100644 index 0000000..d80fb72 --- /dev/null +++ b/group_vars/accounting_vdesks/netif.yml @@ -0,0 +1,9 @@ +netif_primary: virt +netifs_profile: + virt: + networks: + - tg-accounting-net + type: virt + virt_host_netif: virt + dns_resolvers: + - 213.186.33.99 diff --git a/group_vars/accounting_vdesks/users.yml b/group_vars/accounting_vdesks/users.yml new file mode 100644 index 0000000..09d7cb2 --- /dev/null +++ b/group_vars/accounting_vdesks/users.yml @@ -0,0 +1,13 @@ +users: + chaotika: + uid: 4716 + gid: 4716 + ssh_authorized_keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLQiFZ/RhEm09JDFD9waZiIIeuTlf1AHYonqCC3WYLQ chaotika@togusa + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFwvPnaIhyfDr1WsczFgT3SSKa7DbVMCy5uM3zGUvAk chaotika@ffmine-server + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDn/llKlfBl+G38g+09LHBheQjZr3iJAjDqiC7koD9yu chaotika@aramaki + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDtwfozbvy7kBLJwsqleNxPH4wG2hMRCYdWpyLuNrKwO chaotika@astanial + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDw6aNSXoTiSZhuSAT4MH//NRQrfvdVMdk42d5Y+mhKR chaotika@hal + - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo5TqkwTwAEeXlMpHu0v5eybQUpWabeCkq4rIAHOBhnFaq0KiY6BMfX66ltpWa+f2ukySAmU5TNpXRwavVzEhGPF5kSYPfUGpZE8ZzpLr4di20aKzoENmVQ8zA6FqTmnfRCoZ2xA7xOBGC+pcergsIbl/oVpjaE4MLqp6jGp2s4z9uNkZq0IOYdIk0w5PddT$ + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOC5/P9eYaHzOZGB/HE7zpjbCiYkfPFBzMvqIglFOWLe ansible-generated on tg-devops-emardely + linger: true diff --git a/group_vars/accounting_vdesks/virt.yml b/group_vars/accounting_vdesks/virt.yml new file mode 100644 index 0000000..c4e0709 --- /dev/null +++ b/group_vars/accounting_vdesks/virt.yml @@ -0,0 +1 @@ +virt_host: tg-srv-2 diff --git a/group_vars/all/ips.yml b/group_vars/all/ips.yml new file mode 100644 index 0000000..a46dc52 --- /dev/null +++ b/group_vars/all/ips.yml @@ -0,0 +1,11 @@ +ips: +- host: tg-srv-2 + ip: 172.23.144.1 + netif: virt + network: tg-accounting-net + subnet: 172.23.144.0/20 +- host: tg-accounting-feripent + ip: 172.23.144.2 + netif: virt + network: tg-accounting-net + subnet: 172.23.144.0/20 diff --git a/group_vars/all/networks.yml b/group_vars/all/networks.yml new file mode 100644 index 0000000..1238d1e --- /dev/null +++ b/group_vars/all/networks.yml @@ -0,0 +1,14 @@ +networks: + + tg-net: + subnets: + - fd47:17e0:993c::/48 + - 172.23/16 + - 172.24/16 + + tg-accounting-net: + parent: tg-net + site: tg-accounting + subnets: + - fd47:17e0:993c:90::/60 + - 172.23.144/20 diff --git a/group_vars/all/site.yml b/group_vars/all/site.yml new file mode 100644 index 0000000..3bd799e --- /dev/null +++ b/group_vars/all/site.yml @@ -0,0 +1 @@ +site_name: tg-accounting diff --git a/group_vars/all/users.yml b/group_vars/all/users.yml new file mode 100644 index 0000000..7cbf1cf --- /dev/null +++ b/group_vars/all/users.yml @@ -0,0 +1,8 @@ +root_ssh_authorized_keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLQiFZ/RhEm09JDFD9waZiIIeuTlf1AHYonqCC3WYLQ chaotika@togusa + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFwvPnaIhyfDr1WsczFgT3SSKa7DbVMCy5uM3zGUvAk chaotika@ffmine-server + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDn/llKlfBl+G38g+09LHBheQjZr3iJAjDqiC7koD9yu chaotika@aramaki + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDtwfozbvy7kBLJwsqleNxPH4wG2hMRCYdWpyLuNrKwO chaotika@astanial + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDw6aNSXoTiSZhuSAT4MH//NRQrfvdVMdk42d5Y+mhKR chaotika@hal + - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo5TqkwTwAEeXlMpHu0v5eybQUpWabeCkq4rIAHOBhnFaq0KiY6BMfX66ltpWa+f2ukySAmU5TNpXRwavVzEhGPF5kSYPfUGpZE8ZzpLr4di20aKzoENmVQ8zA6FqTmnfRCoZ2xA7xOBGC+pcergsIbl/oVpjaE4MLqp6jGp2s4z9uNkZq0IOYdIk0w5PddT$ + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOC5/P9eYaHzOZGB/HE7zpjbCiYkfPFBzMvqIglFOWLe ansible-generated on tg-devops-emardely diff --git a/group_vars/virt_hosts/netif.yml b/group_vars/virt_hosts/netif.yml new file mode 100644 index 0000000..a555d9c --- /dev/null +++ b/group_vars/virt_hosts/netif.yml @@ -0,0 +1,5 @@ +netifs_profile: + virt: + networks: + - tg-accounting-net + type: virt_pointopoint diff --git a/host_files/tg-accounting-feripent/root/.local/share/fish/fish_history b/host_files/tg-accounting-feripent/root/.local/share/fish/fish_history new file mode 100644 index 0000000..c1e528a --- /dev/null +++ b/host_files/tg-accounting-feripent/root/.local/share/fish/fish_history @@ -0,0 +1,8 @@ +- cmd: uptime + when: 1509999241 +- cmd: ip a + when: 1509999672 +- cmd: tail -f /var/log/apt/term.log + when: 1509999678 + paths: + - /var/log/apt/term.log diff --git a/host_vars/tg-accounting-feripent/netif.yml b/host_vars/tg-accounting-feripent/netif.yml new file mode 100644 index 0000000..c5fd3d9 --- /dev/null +++ b/host_vars/tg-accounting-feripent/netif.yml @@ -0,0 +1,21 @@ +ansible_host: fd47:17e0:993c:90:47:e1ff:feab:2463 +netifs: + virt: + device: enp1s3 + dns_resolvers: + - 213.186.33.99 + eui64: 47:e1ff:feab:2463 + id: 308728767587 + ips: + - ip: fd47:17e0:993c:90:47:e1ff:feab:2463/60 + type: eui64 + - ip: 172.23.144.2/20 + type: host + ll6: fe80::47:e1ff:feab:2463 + mac: 02:47:e1:ab:24:63 + networks: + - tg-accounting-net + type: virt + virt_host_netif: virt + virt_pci_id: 0 +ssh_ip: fd47:17e0:993c:90:47:e1ff:feab:2463 diff --git a/host_vars/tg-accounting-feripent/ssh_host_key.yml b/host_vars/tg-accounting-feripent/ssh_host_key.yml new file mode 100644 index 0000000..6bc0141 --- /dev/null +++ b/host_vars/tg-accounting-feripent/ssh_host_key.yml @@ -0,0 +1 @@ +ssh_host_key_ed25519_public: AAAAC3NzaC1lZDI1NTE5AAAAIIg7ic7EXHDN+S6Jj3o50zmRCwBgsHJyI5ctfmU8P+hc diff --git a/host_vars/tg-accounting-feripent/staging.yml b/host_vars/tg-accounting-feripent/staging.yml new file mode 100644 index 0000000..89ce00c --- /dev/null +++ b/host_vars/tg-accounting-feripent/staging.yml @@ -0,0 +1 @@ +stage: production diff --git a/host_vars/tg-accounting-feripent/virt.yml b/host_vars/tg-accounting-feripent/virt.yml new file mode 100644 index 0000000..00b2039 --- /dev/null +++ b/host_vars/tg-accounting-feripent/virt.yml @@ -0,0 +1,21 @@ +boot_devices: +- /dev/vda +filesystems: +- device: /dev/vda + fstype: btrfs + mount_point: / + uuid: 4d184c9f-b62d-5dbd-a5dc-2de5394cbc13 +grub_cmdline_linux_default: quiet console=ttyS0 +grub_terminal: serial +swap_devices: +- device: /dev/vdb + uuid: 87c9b987-b235-5b55-a43c-9cb3d0b60827 +virt_disks: +- boot: true + name: root + size: 32G +- name: swap + size: 2G +virt_memory: 1024 +virt_uuid: 57752cef-5f7d-4a99-90c1-3692d3e8f272 +virt_vcpu: 1 diff --git a/host_vars/tg-srv-2/host.yml b/host_vars/tg-srv-2/host.yml new file mode 100644 index 0000000..0a83d7a --- /dev/null +++ b/host_vars/tg-srv-2/host.yml @@ -0,0 +1 @@ +ansible_host: tg-srv-2.thengo.net diff --git a/host_vars/tg-srv-2/netif.yml b/host_vars/tg-srv-2/netif.yml new file mode 100644 index 0000000..8b1c9fb --- /dev/null +++ b/host_vars/tg-srv-2/netif.yml @@ -0,0 +1,14 @@ +netifs: + virt: + eui64: 47:7dff:fe34:cd4 + id: 307043241172 + ips: + - ip: fd47:17e0:993c:90:47:7dff:fe34:cd4/60 + type: eui64 + - ip: 172.23.144.1/20 + type: host + ll6: fe80::47:7dff:fe34:cd4 + mac: 02:47:7d:34:0c:d4 + networks: + - tg-accounting-net + type: virt_pointopoint diff --git a/host_vars/tg-srv-2/staging.yml b/host_vars/tg-srv-2/staging.yml new file mode 100644 index 0000000..89ce00c --- /dev/null +++ b/host_vars/tg-srv-2/staging.yml @@ -0,0 +1 @@ +stage: production diff --git a/inventory b/inventory new file mode 100644 index 0000000..bd5580b --- /dev/null +++ b/inventory @@ -0,0 +1,5 @@ +[virt_hosts] +tg-srv-2 + +[accounting_vdesks] +tg-accounting-feripent diff --git a/roles b/roles new file mode 120000 index 0000000..8099852 --- /dev/null +++ b/roles @@ -0,0 +1 @@ +/home/chaotika/ansible-roles/ \ No newline at end of file diff --git a/virt_hosts.yml b/virt_hosts.yml new file mode 100644 index 0000000..ee62702 --- /dev/null +++ b/virt_hosts.yml @@ -0,0 +1,15 @@ +--- + +- hosts: virt_hosts + gather_facts: false + roles: + - name: staging + default_stage: staging + +- hosts: virt_hosts:&staging + remote_user: root + gather_facts: false + roles: + - role: netif + - name: staging + next_stage: production