Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat > /root/tower_setup_conf.yml <<'EOF'
- admin_password: redhat01
- database: internal
- munin_password: redhat01
- pg_password: redhat01
- primary_machine: localhost
- redis_password: redhat01
- EOF
- cat > /root/inventory <<'EOF'
- [primary]
- localhost ansible_connection=local
- [all:vars]
- admin_password='redhat01'
- redis_password='redhat01'
- pg_host=''
- pg_port=''
- pg_database='awx'
- pg_username='awx'
- pg_password='redhat01'
- [all:children]
- primary
- EOF
- cat > /root/tower_install.sh <<'EOF'
- #!/bin/bash -v
- yum install -y epel-release
- yum install -y ansible
- # Pull and extract the installer
- cd /root
- curl -O http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz
- tar xzf ansible-tower-setup-latest.tar.gz
- # Get the extracted folder name
- ANSIBLE_SETUP_FOLDER=`tar tf ansible-tower-setup-latest.tar.gz | awk -F/ '{ print $1 }' | uniq`
- # Copy everything to working directory and install
- cp inventory $ANSIBLE_SETUP_FOLDER/inventory
- cp tower_setup_conf.yml $ANSIBLE_SETUP_FOLDER/tower_setup_conf.yml
- cd $ANSIBLE_SETUP_FOLDER
- ./setup.sh
- EOF
- chmod +x /root/tower_install.sh
- /root/tower_install.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement