kouji-kojima-ansible.el7-init

EC2 CentOS7, RHEL7 Initialization Role

Install Role

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

Process Details

  1. Set the locale and timezone to Japanese.
  2. Configure the Proxy settings for environment variables, yum, rpm, wget, and git.
  3. Install the company CA certificate.
  4. Disable Firewalld and SELinux.
  5. Enable password login.

Example 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-init }
EOF

Example Hosts

# In case of localhost
cat << EOF > localhost
[servers]
localhost ansible_connection=local
EOF

# In case of staging environment
cat << EOF > staging
[servers]
HostName or IP
HostName or IP

[all:vars]
ansible_ssh_user=ec2-user
EOF

Execute Playbook

Example of 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

License

Apache License Version 2.0

Author Information

Kouji Kojima

Installa
ansible-galaxy install kouji-kojima-ansible.el7-init
Licenza
apache-2.0
Download
99
Proprietario