build(ansible): remove ansible

This commit is contained in:
2026-07-13 23:36:21 +03:00
parent 4212d85d86
commit ee4438f2b4
21 changed files with 0 additions and 199 deletions

View File

@@ -1,11 +0,0 @@
[defaults]
hash_behaviour = merge
host_key_checking = False
#callback_whitelist = profile_tasks
display_skipped_hosts = False
stdout_callback = yaml
bin_ansible_callbacks = True
[ssh_connection]
pipelining = True
ssh_args = -o ForwardAgent=yes

View File

@@ -1,14 +0,0 @@
---
- hosts: all
vars:
ansible_user: "{{ deploy_user }}"
roles:
- ansible-deploy
- build
post_tasks:
- include_role:
name: ansible-deploy
tasks_from: complete.yml
- include_role:
name: service
tasks_from: restart.yml

View File

@@ -1,2 +0,0 @@
all:
hosts: localhost

View File

@@ -1,15 +0,0 @@
---
project_name: tankz
project_user: holop
deploy_user: "{{ project_user }}"
deploy_project: "{{ project_name }}"
deploy_repo_url: "git@bitbucket.org:infernalgames/{{ project_name }}.git"
deploy_repo_version: develop
deploy_npm: yes
service_name: "{{ project_name }}"
service_work_dir: "{{ deploy_current_dir }}/target/server/cpp"
service_command: "{{ service_work_dir }}/{{ project_name }} {{ service_host }}"
service_user: www-data
service_control_user: "{{ project_user }}"

View File

@@ -1,5 +0,0 @@
all:
hosts: shmyga.ru
vars:
service_host: 213.139.208.180
config_src: "/home/holop/tankz/config.json"

View File

@@ -1,7 +0,0 @@
---
- name: ansible-deploy
src: git@bitbucket.org:shmyga/ansible-deploy.git
version: master
scm: git
- name: geerlingguy.nodejs

View File

@@ -1,2 +0,0 @@
config_src: "{{ deploy_release_dir }}/config.{{ inventory_hostname }}.json"
config_dest: "{{ deploy_release_dir }}/config.json"

View File

@@ -1,11 +0,0 @@
---
- name: "Copy config"
copy:
src: "{{ config_src }}"
dest: "{{ config_dest }}"
remote_src: true
- name: "Gulp build"
command: "{{ deploy_release_dir }}/node_modules/.bin/gulp default --host shmyga.ru"
args:
chdir: "{{ deploy_release_dir }}"

View File

@@ -1,6 +0,0 @@
service_name: null
service_description: "{{ service_name }} service"
service_work_dir: null
service_command: null
service_user: null
service_control_user: null

View File

@@ -1,21 +0,0 @@
---
- name: "Install {{ service_name }} systemd unit file"
template:
src: "template/service.j2"
dest: "/etc/systemd/system/{{ service_name }}.service"
- name: "Start {{ service_name }} service"
systemd:
enabled: yes
state: started
name: "{{ service_name }}"
daemon_reload: yes
- name: "Add sudoers record for {{ service_name }} service"
lineinfile:
path: /etc/sudoers.d/{{ service_name }}
state: present
create: yes
regexp: "^{{ service_control_user }} ALL="
line: "{{ service_control_user }} ALL= NOPASSWD: /bin/systemctl * {{ service_name }}"
validate: "/usr/sbin/visudo -cf %s"

View File

@@ -1,11 +0,0 @@
---
# - name: "Restart {{ service_name }} service"
# systemd:
# enabled: yes
# state: restarted
# name: "{{ service_name }}"
- name: "Restart {{ service_name }} service"
command: "sudo /bin/systemctl restart {{ service_name }}"
args:
warn: no

View File

@@ -1,15 +0,0 @@
[Unit]
Description={{ service_description }}
[Service]
Type=simple
PIDFile=/var/run/{{ service_name }}.pid
WorkingDirectory={{ service_work_dir }}
User={{ service_user }}
Group={{ service_user }}
ExecStart={{ service_command }}
TimeoutSec=300
Restart=always
[Install]
WantedBy=multi-user.target

View File

@@ -1,3 +0,0 @@
- name: "Install neko package"
apt:
name: neko

View File

@@ -1,2 +0,0 @@
- import_tasks: apt.yml
when: ansible_distribution|lower == 'ubuntu'

View File

@@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCot1zSeqj7Tj5/7aNMzXAuXQPPxudYFV9z6M03dPijh2bXyHDcXk53xUO8XY5R4GyLhvAn98axbPM++urKY8BXuQqAG36soI7iZJ/KcPY1EKDwVBeZneFC/wMc8HMT0hj9+uHcGAMtmklIgPPkawzLxbEh6oAY4H8Vvz08qyco6suYB5NjkpFwVMf9Xa2Fj8rTodKpPRDBh/Xk+5bh11RKL6b9WcwuwpKU8zl2qZiqNfjr0H+sKEk7ohcYvzSCltLdKJcoKbiCcnrnBJT5/JpGWeAbA2MMmvmt/dJrHykd1CbmXW2DuG4tIlwMb5xU739PoKCePctK1retb8TrWOLT shmyga@shmyga-desktop

View File

@@ -1,40 +0,0 @@
# barin
- name: Make barin group
group:
name: barin
state: present
- name: Make barin user
user:
name: barin
group: barin
password: '$6$mbw5KZWwtrRUy$eFcMNTW.QzG1Em45r5hZf/qri4hKAHImozWuW4/pYnDK.tOrVKrXTKYfRDtYEFRgCgVVg0zuPvyq/xn0KiKlz0'
groups: www-data,sudo,adm
- name: Set up authorized_keys for the barin user
authorized_key:
user: barin
key: '{{ item }}'
with_file:
- keys/shmyga.pub
# holop
- name: Make holop group
group:
name: holop
state: present
- name: Make holop user
user:
name: holop
group: holop
password: '$6$B/7g0xlcXFCIHk$hzSjb8KLll7YrTsp3z640sxNixNAkLpm6UUdZgWPh0Ffy7Ue18AiXTzkDdGTaTH6Woz4kvgVDSggnKGTU6u03.'
groups: www-data
- name: Set up authorized_keys for the holop user
authorized_key:
user: holop
key: '{{ item }}'
with_file:
- keys/shmyga.pub

View File

@@ -1 +0,0 @@
ansible_become: yes

View File

@@ -1,8 +0,0 @@
---
- hosts: all
vars:
ansible_user: "{{ deploy_user }}"
tasks:
- include_role:
name: service
tasks_from: restart.yml

View File

@@ -1,16 +0,0 @@
---
- hosts:
- all
pre_tasks:
- include_role:
name: ansible-deploy
tasks_from: facts.yml
roles:
- geerlingguy.nodejs
- setup
- service
vars:
nodejs_version: 9.x
nodejs_npm_global_packages: [gulp-cli]
vars_files:
- vars/barin.yml

View File

@@ -1,4 +0,0 @@
- hosts: all
gather_facts: no
roles:
- user

View File

@@ -1,4 +0,0 @@
---
ansible_user: barin
ansible_become_pass: 1234!QAZ
ansible_become: yes