diff --git a/plugins/monodevelop/config.yaml b/plugins/monodevelop/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..17129adf0cf437b20da587917b024bce3a722ddd --- /dev/null +++ b/plugins/monodevelop/config.yaml @@ -0,0 +1,24 @@ +all: + children: + monodevelop_hosts: + hosts: + HOST_IP: +<<<<<<< HEAD + ansible_host: HOST_IP + ansible_port: 22 + ansible_user: root + ansible_password: "" +======= + ansible_host: 192.168.137.74 + ansible_port: 22 + ansible_user: root + ansible_password: "huawei@123" +>>>>>>> 7f19a5e (新增monodevelop安装部署脚本) + architecture: amd64 + oeversion: 20.03-LTS-SP4 + vars: + ansible_ssh_common_args: '-o StrictHostKeyChecking=no' + + # MonoDevelop 相关配置 + monodevelop_repo_url: "https://repo.oepkgs.net/openeuler/rpm/openEuler-20.03-LTS-SP4/contrib/others/$basearch/" + libgdiplus_repo_url: "https://repo.oepkgs.net/openeuler/rpm/openEuler-20.03-LTS-SP4/extras/$basearch/" \ No newline at end of file diff --git a/plugins/monodevelop/doc/readme.md b/plugins/monodevelop/doc/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..6f501dcbc8e6948684d2462f04a24dd676738f3a --- /dev/null +++ b/plugins/monodevelop/doc/readme.md @@ -0,0 +1,58 @@ +# MonoDevelop 插件 + +这是一个用于在 openEuler 系统上安装和管理 MonoDevelop IDE 的 oeDeploy 插件。 + +## 功能特性 + +- 一键安装 MonoDevelop IDE +- 支持卸载 MonoDevelop +- 自动配置官方软件源 + +## 系统要求 + +- openEuler 20.03-LTS-SPx 版本 +- 桌面环境(ukui或deepin) +- 规格大于4U8G + +## 安装桌面(以UKUI为例,需要提前手动执行) + +1. 更新软件包命令: `sudo dnf update` +2. 运行桌面安装命令:`sudo dnf install ukui` +3. 启用图形化界面方式启动: `systemctl set-default graphical.target` +4. 重启机器 + +## 安装步骤 + +1. 配置主机信息在 `config.yaml` 中 +2. 运行安装命令:`oedp run monodevelop install` + +## 卸载步骤 + +运行卸载命令:`oedp run monodevelop uninstall` + +## 配置说明 + +在 `config.yaml` 中配置目标主机信息: + +```yaml +monodevelop_hosts: + hosts: + your_host_ip: + ansible_host: your_host_ip + ansible_port: 22 + ansible_user: root + ansible_password: "" + architecture: amd64 # [amd64, arm64] + oeversion: 20.03-LTS-SP4 +``` + +## 注意事项 + +- 需要 root 权限执行安装 +- 确保网络连接正常以访问软件源 +- 安装过程会自动添加官方 MonoDevelop 软件源 + +## 版本信息 + +- 当前版本:1.0.0 +- 更新时间:2025-08-20 \ No newline at end of file diff --git a/plugins/monodevelop/main.yaml b/plugins/monodevelop/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d4fc5874fa78e018e8e73be716c63b09eb358a68 --- /dev/null +++ b/plugins/monodevelop/main.yaml @@ -0,0 +1,21 @@ +name: monodevelop +version: 1.0.0 +url: https://gitee.com/openeuler/oeDeploy/tree/master/plugins/monodevelop +description: oeDeploy plugin for MonoDevelop installation and management +description_zh: 帮助开发者在openEuler系统上安装和管理MonoDevelop IDE的oeDeploy插件。 +description_en: The oeDeploy plugin that helps developers install and manage MonoDevelop IDE on openEuler systems. +type: app +localhost_available: true +action: + install: + description: install MonoDevelop + tasks: + - name: install MonoDevelop + playbook: install-monodevelop.yml + scope: monodevelop_hosts + uninstall: + description: uninstall MonoDevelop + tasks: + - name: uninstall MonoDevelop + playbook: uninstall-monodevelop.yml + scope: monodevelop_hosts \ No newline at end of file diff --git a/plugins/monodevelop/workspace/hosts.ini b/plugins/monodevelop/workspace/hosts.ini new file mode 100644 index 0000000000000000000000000000000000000000..3a31d92dc6d037bc27804ba090e589be7bc2510f --- /dev/null +++ b/plugins/monodevelop/workspace/hosts.ini @@ -0,0 +1,7 @@ +[monodevelop_hosts] +# 配置MonoDevelop安装目标主机 +# 192.168.1.100 ansible_user=root ansible_password=your_password + +[monodevelop_hosts:vars] +# 全局变量 +ansible_ssh_common_args='-o StrictHostKeyChecking=no' \ No newline at end of file diff --git a/plugins/monodevelop/workspace/install-monodevelop.yml b/plugins/monodevelop/workspace/install-monodevelop.yml new file mode 100644 index 0000000000000000000000000000000000000000..60faffbef36989938ec4a9405b0adb2ed5a916cf --- /dev/null +++ b/plugins/monodevelop/workspace/install-monodevelop.yml @@ -0,0 +1,3 @@ +- hosts: monodevelop_hosts + roles: + - install \ No newline at end of file diff --git a/plugins/monodevelop/workspace/roles/install/tasks/main.yml b/plugins/monodevelop/workspace/roles/install/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..fda266ce5cc31c60bdf91897a95b983952ce5f23 --- /dev/null +++ b/plugins/monodevelop/workspace/roles/install/tasks/main.yml @@ -0,0 +1,62 @@ +<<<<<<< HEAD +- name: Check kernel version compatibility + shell: uname -r + register: kernel_version + changed_when: false + +- name: Fail if kernel version is not 4.19.x + fail: + msg: "Unsupported kernel version: {{ kernel_version.stdout }}. Only kernel versions starting with 4.19 are supported for MonoDevelop installation." + when: not kernel_version.stdout.startswith('4.19') + +======= +>>>>>>> 7f19a5e (新增monodevelop安装部署脚本) +- name: Check Python 3 availability + shell: which python3 + register: python3_path + changed_when: false + +- name: Set ansible_python_interpreter if Python 3 is available + set_fact: + ansible_python_interpreter: "{{ python3_path.stdout }}" + when: python3_path.stdout != "" + +- name: Add MonoDevelop repository with disabled GPG check + copy: + content: | + [monodevelop] + name=MonoDevelop Repository + baseurl={{ monodevelop_repo_url }} + enabled=1 + gpgcheck=0 + dest: /etc/yum.repos.d/monodevelop.repo + +- name: Add openEuler extras repository + copy: + content: | + [openeuler-extras] + name=openEuler Extras Repository + baseurl={{ libgdiplus_repo_url }} + enabled=1 + gpgcheck=0 + dest: /etc/yum.repos.d/libgdiplus.repo + +- name: Clean dnf cache + shell: dnf clean all + +- name: Make dnf cache + shell: dnf makecache + +- name: Install MonoDevelop + package: + name: monodevelop + state: present + +- name: Verify MonoDevelop installation + shell: which monodevelop + register: monodevelop_path + changed_when: false + +- name: Display installation result + debug: + msg: "MonoDevelop installed successfully at {{ monodevelop_path.stdout }}" \ No newline at end of file diff --git a/plugins/monodevelop/workspace/roles/uninstall/tasks/main.yml b/plugins/monodevelop/workspace/roles/uninstall/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..af3898787a85fa30babef8fd1e16a09666ad37a6 --- /dev/null +++ b/plugins/monodevelop/workspace/roles/uninstall/tasks/main.yml @@ -0,0 +1,25 @@ +- name: Check if MonoDevelop is installed + shell: rpm -q monodevelop + register: monodevelop_installed + ignore_errors: true + changed_when: false + +- name: Uninstall MonoDevelop + package: + name: monodevelop + state: absent + when: monodevelop_installed.rc == 0 + +- name: Clean dnf cache + shell: dnf clean all + when: monodevelop_installed.rc == 0 + +- name: Display uninstallation result + debug: + msg: "MonoDevelop was successfully uninstalled" + when: monodevelop_installed.rc == 0 + +- name: Display not installed message + debug: + msg: "MonoDevelop is not installed" + when: monodevelop_installed.rc != 0 \ No newline at end of file diff --git a/plugins/monodevelop/workspace/uninstall-monodevelop.yml b/plugins/monodevelop/workspace/uninstall-monodevelop.yml new file mode 100644 index 0000000000000000000000000000000000000000..db0acb41b2ebb8ebb54b423112568cd1b4d74af4 --- /dev/null +++ b/plugins/monodevelop/workspace/uninstall-monodevelop.yml @@ -0,0 +1,3 @@ +- hosts: monodevelop_hosts + roles: + - uninstall \ No newline at end of file diff --git a/plugins/monodevelop/workspace/variables.yml b/plugins/monodevelop/workspace/variables.yml new file mode 100644 index 0000000000000000000000000000000000000000..27882d7d66def8b6f000e818920a42f4c715c815 --- /dev/null +++ b/plugins/monodevelop/workspace/variables.yml @@ -0,0 +1,4 @@ +# MonoDevelop 插件变量配置 +monodevelop_package: "monodevelop" +monodevelop_repo_name: "monodevelop-official" +ansible_python_interpreter: /usr/bin/python3 \ No newline at end of file