AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-557388

Subramanian Lakshmanan's questions

Martin Hope
Subramanian Lakshmanan
Asked: 2020-06-10 05:37:50 +0800 CST

AWS 中的生产级自动扩展

  • 0

我已经完全理解了 AWS 中 Auto-Scaling 的概念。我唯一的问题是,在生产环境中启动配置将使用什么 AMI?

根据我的理解,应该使用现有实例的图像。假设我使用了现有实例的图像。

如果将来现有实例有任何变化怎么办?在这种情况下,我们必须更新 AMI。

是否有任何流程可以自动化此流程?

amazon-ec2 amazon-web-services autoscaling amazon-ami
  • 2 个回答
  • 35 Views
Martin Hope
Subramanian Lakshmanan
Asked: 2020-02-07 05:13:41 +0800 CST

在 CentOS 7 上升级内核的命令

  • 0

我当前的内核是 3.10.0-957.1.3.el7.x86_64。我通过使用命令了解了这一点uname -r。现在我想将我的内核版本升级到 3.10.0-1062.12.1.el7.x86_64。

我使用下面的博客来升级我的内核

https://www.howtoforge.com/tutorial/how-to-upgrade-kernel-in-centos-7-server/

但内核已更新到 5.5.2-1.el7.elrepo.x86_64

我需要特定版本的 3.10.0-1062.12.1.el7.x86_64。

谁能帮我解决这个问题。

提前致谢,

苏布乔什。

linux centos kernel linux-kernel centos7
  • 1 个回答
  • 620 Views
Martin Hope
Subramanian Lakshmanan
Asked: 2020-01-28 04:36:36 +0800 CST

使用 Ansible 在多个操作系统上安装多个包

  • 0

我有一台带有 2 台服务器的主机:一台安装了 CentOS,另一台安装了 Ubuntu。

我决定在两台服务器上安装 apache、nginx 和 php-fpm,并编写了 3 个剧本。

  1. ubuntu.yml (/home/ansible/playbook):
---
- name: Ubuntu Playbook
  hosts: ubun
  become: true
  vars:
   - packages:
     - nginx
     - apache2
     - php-fpm 
  tasks:
   - name: Update apt package
   apt:
   name: "*"
   state: latest
   update_cache: yes
   - name: Install Packages
     apt:
       pkg: "{{ packages }}"
       state: latest
       update_cache: yes
   - name: Apache Service Start
     service:
       name: nginx
       state: restarted
       enabled: yes
  1. centos.yml (/home/ansible/playbook):
---
- name: CentOS Playbook
  hosts: cent
  become: true
  vars:
   packages:
   - epel-release
   - httpd
   - nginx
   - php-fpm
  tasks:
   - name: Update yum package
     yum:
       name: "*"
       state: latest
       update_cache: yes
   - name: Install Packages
     yum:
       name: "{{ packages }}"
       state: latest
       update_cache: yes
   - name: Apache Service Start
     service:
       name: nginx
       state: restarted
       enabled: yes
  1. base.yml (/home/ansible/playbook):
---
- name: Base Playbook
  hosts: aws
  become: true
  tasks:
    - name: Performing Tasks for CentOS
      when: ansible_facts['distribution'] == 'CentOS'
      include_tasks: centos.yml
    - name: Performing Tasks for Ubuntu
      when: ansible_facts['distribution'] == 'Ubuntu'
      include_tasks: ubuntu.yml

我的 3 个 Ansible 组是:

  • [aws] 包含两个服务器

  • [cent] 包含 CentOS 服务器

  • [ubun] 包含 Ubuntu 服务器

我尝试了空运行centos.yml和ubuntu.yml单独运行并且它有效,但是当我尝试空运行时base.yml出现以下错误:

    FAILED! => {"reason": "unexpected parameter type in action: <class 'ansible.parsing.yaml.objects.AnsibleSequence'>\n\nThe error appears to be in '/home/ansible/playbook/centos.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: CentOS Playbook\n  ^ here\n"}

    FAILED! => {"reason": "unexpected parameter type in action: <class 'ansible.parsing.yaml.objects.AnsibleSequence'>\n\nThe error appears to be in '/home/ansible/playbook/ubuntu.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Ubuntu Playbook\n  ^ here\n"}

我已经尝试替换import_tasks为,include_tasks但我得到了同样的错误。

ansible ansible-playbook
  • 2 个回答
  • 7118 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve