sborenst
2017-08-14 61803d56e066a0165e6e25897dc5b015b1074204
minor updates to ansible-provisioner
3 files modified
47 ■■■■■ changed files
ansible/configs/ansible-provisioner/README.adoc 24 ●●●● patch | view | raw | blame | history
ansible/configs/ansible-provisioner/env_vars.yml 12 ●●●● patch | view | raw | blame | history
ansible/configs/ansible-provisioner/post_software.yml 11 ●●●● patch | view | raw | blame | history
ansible/configs/ansible-provisioner/README.adoc
@@ -12,12 +12,12 @@
- download repositories (ansible_agnostic_deployer, private OPEN_Admin)
- installed dependencies to run ansible_agnostic_deployer
//
//
// we create folders, yml files, and other items we want to over ride default variables.
//
//
// For example, we will include things such as ec2 instance names, secret
// variables such as private/public key pair information, passwords, etc.
//
//
// Eventually, all sensitive information will be encypted via Ansible Vault. The
// inclusion as well as instructions on doing this will be included in a later
// release.
@@ -68,7 +68,7 @@
        branch: master
        dest: "/home/opentlc-mgr/OPEN_Admin"
        user: "{{ github_user }}"
        password: "{{ github_token }}"
        password: "{{ github_token }}"
    private_key: ocpkey
    authorized_keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4OojwKH74UWVOY92y87Tb/b56CMJoWbz2gyEYsr3geOc2z/n1pXMwPfiC2KT7rALZFHofc+x6vfUi6px5uTm06jXa78S7UB3MX56U3RUd8XF3svkpDzql1gLRbPIgL1h0C7sWHfr0K2LG479i0nPt/X+tjfsAmT3nWj5PVMqSLFfKrOs6B7dzsqAcQPInYIM+Pqm/pXk+Tjc7cfExur2oMdzx1DnF9mJaj1XTnMsR81h5ciR2ogXUuns0r6+HmsHzdr1I1sDUtd/sEVu3STXUPR8oDbXBsb41O5ek6E9iacBJ327G3/1SWwuLoJsjZM0ize+iq3HpT1NqtOW6YBLR opentlc-mgr@inf00-mwl.opentlc.com
@@ -122,11 +122,9 @@
. You can run the playbook with the following arguments to overwrite the default variable values:
[source,bash]
----
## For a HA environment
REGION=ap-southeast-1
KEYNAME=ansible_provisioner
GUID=apac
REGION=ap-southeast-2
KEYNAME=somekey
GUID=guid
ENVTYPE="ansible-provisioner"
CLOUDPROVIDER=ec2
HOSTZONEID='Z3IHLWJZOU9SRT'
@@ -146,11 +144,11 @@
[source,bash]
----
REGION=ap-southeast-2
KEYNAME=osesharedkey
GUID=ocptestha4
ENVTYPE="ocp-ha-lab"
KEYNAME=somekey
GUID=guid
ENVTYPE="ansible-provisioner"
CLOUDPROVIDER=ec2
HOSTZONEID='Z3IHLWJZOU9SRT'
#To Destroy an Env
ansible-playbook -i inventory/ ./configs/${ENVTYPE}/destroy_env.yml \
 -e "guid=${GUID}" \
ansible/configs/ansible-provisioner/env_vars.yml
@@ -56,11 +56,11 @@
  - rhel-7-server-optional-rpms
  - rhel-7-server-rh-common-rpms
use_subscription_manager: true
use_subscriptions: true
use_own_repos: false
#use_subscription_manager: true
#use_subscriptions: true
#use_own_repos: false
#rhn_pool_id_string: "Red Hat Enterprise Linux Server"
rhn_pool_id_string: OpenShift Container Platform
#rhn_pool_id_string: OpenShift Container Platform
################################################################################
#### CLOUD PROVIDER: AWS SPECIFIC VARIABLES
@@ -69,7 +69,7 @@
#### Route 53 Zone ID (AWS)
HostedZoneId: ''
key_name: ''
aws_region: us-west-2
aws_region: us-west-1
# admin_user: 'admin'
# admin_user_password: 'r3dh4t1!'
@@ -88,7 +88,7 @@
#### Environment Sizing
provisioner_instance_type: "c4.large"
provisioner_instance_type: "c4.2xlarge"
ansible_ssh_private_key_file: ~/.ssh/{{key_name}}.pem
ansible/configs/ansible-provisioner/post_software.yml
@@ -54,6 +54,8 @@
    - name: install ansible
      yum:
        name: python2-pip
    - name: install boto3
      command: pip install boto3
    - name: Install awscli
      pip:
@@ -101,7 +103,7 @@
    - name: install lvm2
      yum:
        name: lvm2
    - lvg:
        vg: "{{ storage_vg }}"
        pvs: "{{ storage_pvs }}"
@@ -136,10 +138,3 @@
    - shell: "mkdir -p {{ storage_mount_path }} &&  mount {{ storage_mount_path }}"
      ignore_errors: true
#    - shell: "SELINUX=enforcing"
    #- shell: "systemctl enable http && systemctl restart httpd"
    #- shell: "ln -s {{storage_mount_path}}/repos /var/www/html/repos"
#    - shell: "chcon -R -t httpd_user_content_t /srv"
#    - shell: "chcon -R -t httpd_user_content_t /var/www/html/repos"
### Still need to add "env_secret_vars" files to actually get this to work
### still need to run the repository sync script.