Merge pull request #89 from corvus-migratorius/role-win_onec

Role win onec
This commit is contained in:
Fogucoco
2026-04-09 12:34:00 +03:00
committed by GitHub
11 changed files with 156 additions and 1 deletions

View File

@@ -41,4 +41,5 @@
- [wg_spoke](roles/wg_spoke/README.md)
- [win_chocolatey_install](roles/win_chocolatey_install/README.md)
- [win_firewall](roles/win_firewall/README.md)
- [win_onec](roles/win_onec/README.md)
- [xfs_project_quotas](roles/xfs_project_quotas/README.md)

View File

@@ -1,7 +1,7 @@
---
namespace: genlab
name: common
version: 0.37.0
version: 0.38.0
readme: README.md
authors:
- Alexander Gorelyshev (corvus-migratorius@proton.me)

39
roles/win_onec/README.md Normal file
View File

@@ -0,0 +1,39 @@
win_onec
=========
Install onec on windows machines
Requirements
------------
None
Role Variables
--------------
None
Dependencies
------------
ansible.windows
Example Playbook
----------------
```yaml
roles:
- role: genlab.common.win_onec
win_onec_archive_src: files/windows64full_8_3_26_1540.rar
win_onec_version: 8.3.26.1540
```
License
-------
BSD
Author Information
------------------
malyuk.ss@genlab.llc

View File

@@ -0,0 +1 @@
---

View File

@@ -0,0 +1 @@
---

View File

@@ -0,0 +1,16 @@
---
galaxy_info:
role_name: "win_onec"
namespace: genlab
author: "Sergey Malyuk"
company: "Genlab, LLC"
description: "Installs 1C"
license: "MIT"
min_ansible_version: "2.16"
platforms:
- name: "Windows"
galaxy_tags: []
dependencies: []

View File

@@ -0,0 +1,9 @@
---
- name: Converge
hosts: all
pre_tasks:
# Blank task for ignoring CI testing
# This role was tested manually
- name: Blank
ansible.builtin.command: echo
changed_when: false

View File

@@ -0,0 +1,22 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: ubuntu
image: geerlingguy/docker-ubuntu2204-ansible:latest
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
provisioner:
name: ansible
verifier:
name: ansible
lint: |
set -e
yamllint .
ansible-lint .

View File

@@ -0,0 +1,11 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
# Blank task for ignoring CI testing
# This role was tested manually
- name: Blank
ansible.builtin.command: echo
changed_when: false

View File

@@ -0,0 +1,54 @@
---
- name: Check 1C installation
block:
- name: Get 1C stats
register: win_onec_dir
ansible.windows.win_stat:
path: 'C:\Program Files 64\1cv8\{{ win_onec_version }}'
- name: Assert that 1C directory exists
ansible.builtin.assert:
that: win_onec_dir.stat.exists
success_msg: "1C {{ win_onec_version }} is installed"
fail_msg: "1C {{ win_onec_version }} IS NOT installed"
rescue:
- name: Create temp directory
ansible.windows.win_file:
path: C:\tmp
state: directory
- name: Push 1C archive
ansible.windows.win_copy:
src: "{{ win_onec_archive_src }}"
dest: C:\tmp\onec_install.rar
- name: Get 1c installation stats
register: win_onec_installation_dir
ansible.windows.win_stat:
path: C:\tmp\onec_install\
- name: Extract 1C archive
when: not win_onec_installation_dir.stat.exists
ansible.windows.win_shell: |
7z x "C:\tmp\onec_install.rar" -o"C:\tmp\onec_install" -y
- name: Install 1C
ansible.windows.win_shell: |
C:\tmp\onec_install\setup.exe /S /a /l "ru" /debuglog "C:\tmp\onec_install\setup.log"
- name: Find source files
ansible.windows.win_find:
paths: C:\tmp\onec_install
file_type: file
register: win_onec_found_files
- name: Clean up on C:\ after 1C installation
loop: "{{ win_onec_found_files.files }}"
ansible.windows.win_file:
path: "C:\\{{ item.filename }}"
state: absent
- name: Delete tmp directory
ansible.windows.win_file:
path: C:\tmp
state: absent

View File

@@ -0,0 +1 @@
---