kouji-kojima-ansible.el7-desktop

在 EC2 CentOS7、RHEL7 上安装 xrdp 的角色 (EL7 桌面设置角色)

安装角色

ansible-galaxy install kouji-kojima-ansible.el7-desktop --force

依赖项

kouji-kojima-ansible.el7-init

过程详解

  1. 启用 EPEL (Enable EPEL)
  2. 安装带 GUI 的服务器 (Install Server with GUI group)
  3. 安装 Xrdp (Install Xrdp)
  4. 启动 Xrdp (Run Xrdp)

示例 site.yml

cat << EOF > site.yml
- hosts: servers
  remote_user: ec2-user
  become: yes
  vars:
    proxy_host: proxy.xxxxxxxxx.co.jp
    proxy_port: port_no
    no_proxys: xxxxx.co.jp,yyyy.co.jp
    ca_url: https://xxxxxxxx.co.jp/xxx.ca(*1)
    ca_sha256: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  roles:
    - { role: kouji-kojima-ansible.el7-desktop }
EOF

示例主机

# localhost 的例子 (In case of localhost)
cat << EOF > localhost
[servers]
localhost ansible_connection=local
EOF

# 阶段环境的例子 (In case of staging environment)
cat << EOF > staging
[servers]
主机名或 IP
主机名或 IP

[all:vars]
ansible_ssh_user=ec2-user
EOF

执行 Playbook

执行示例 (Normal execution)

# 本地执行 (In case of localhost)
ansible-playbook -i localhost site.yml --private-key=/path/key.pem

# 阶段环境执行 (In case of staging environment)
ansible-playbook -i staging site.yml --private-key=/path/key.pem

许可证

Apache 许可证第 2.0 版

作者信息

Kouji Kojima

关于项目

el7-desktop

安装
ansible-galaxy install kouji-kojima-ansible.el7-desktop
许可证
apache-2.0
下载
82