Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Vagrant.configure("2") do |config|
gitlab_hostname= "gitlab"
nid = (nid - 1)
config.vm.define "#{gitlab_hostname}" do |node|
node.vm.box = "centos/7"
node.vm.box = "generic/centos8"
node.vm.hostname = "#{gitlab_hostname}"
node.vm.boot_timeout = 600
node.ssh.insert_key = false
Expand All @@ -36,7 +36,7 @@ Vagrant.configure("2") do |config|
v.gui = false
v.vmx["memsize"] = "3072"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
#v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.enable_vmrun_ip_lookup = false
Expand All @@ -46,11 +46,11 @@ Vagrant.configure("2") do |config|
docs_hostname= "docs"
nid = (nid - 1)
config.vm.define "#{docs_hostname}" do |node|
node.vm.box = "centos/7"
node.vm.box = "generic/centos8"
node.vm.hostname = "#{docs_hostname}"
node.vm.boot_timeout = 600
node.ssh.insert_key = false
node.vm.network "forwarded_port", guest: 80, host: 80
node.vm.network "forwarded_port", guest: 80, host: 80, auto_correct: true
node.vm.network :private_network, ip: "10.0.1.5"

node.vm.provider "virtualbox" do |vb, override|
Expand All @@ -73,7 +73,7 @@ Vagrant.configure("2") do |config|
v.gui = false
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
#v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.enable_vmrun_ip_lookup = false
Expand All @@ -91,7 +91,7 @@ Vagrant.configure("2") do |config|
node.winrm.basic_auth_only = false
node.winrm.timeout = 300
node.winrm.retry_limit = 20
node.vm.network "forwarded_port", guest: 5986, host: 5902
node.vm.network "forwarded_port", guest: 5986, host: 5902, auto_correct: true
node.vm.network :private_network, ip: "10.0.1.6"
node.vm.synced_folder ".", "/vagrant", disabled: true

Expand Down Expand Up @@ -129,7 +129,7 @@ Vagrant.configure("2") do |config|
s1_tower_hostname= "s1-tower"
nid = (nid - 1)
config.vm.define "#{s1_tower_hostname}" do |node|
node.vm.box = "centos/7"
node.vm.box = "generic/centos8"
node.vm.hostname = "#{s1_tower_hostname}"
node.vm.boot_timeout = 600
node.ssh.insert_key = false
Expand All @@ -155,7 +155,7 @@ Vagrant.configure("2") do |config|
v.gui = false
v.vmx["memsize"] = "4096"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
#v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.enable_vmrun_ip_lookup = false
Expand Down
11 changes: 6 additions & 5 deletions roles/ansible-tower/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@
group: root
mode: 0644

- name: install the last version of OpenSSL
pip:
name: pyOpenSSL
state: latest

- name: Install dependencies for Kerberos auth
package:
name:
Expand All @@ -89,13 +84,19 @@
- name: Install dependencies for Kerberos auth
package:
name:
- python3-devel
- krb5-devel
- krb5-libs
- krb5-workstation
- gcc
state: present
when: ansible_distribution_major_version|int == 8

- name: upgrade pip
pip:
name: pip
state: latest

- name: Install pywinrm for connecting to windows hosts
pip:
name:
Expand Down
10 changes: 5 additions & 5 deletions roles/ansible-tower/tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,26 @@

- name: download tower installer
get_url:
url: https://releases.ansible.com/ansible-tower/setup-bundle/ansible-tower-setup-bundle-{{ towerversion }}.el{{ ansible_distribution_major_version }}.tar.gz
dest: /tmp/ansible-tower-setup-bundle-{{ towerversion }}.el{{ ansible_distribution_major_version }}.tar.gz
url: https://releases.ansible.com/ansible-tower/setup-bundle/ansible-tower-setup-bundle-{{ towerversion }}.tar.gz
dest: /tmp/ansible-tower-setup-bundle-{{ towerversion }}.tar.gz
mode: 0640
when: towerchk not in towerversion

- name: extract installer
unarchive:
src: /tmp/ansible-tower-setup-bundle-{{ towerversion }}.el{{ ansible_distribution_major_version }}.tar.gz
src: /tmp/ansible-tower-setup-bundle-{{ towerversion }}.tar.gz
dest: /tmp/
remote_src: True
when: towerchk not in towerversion

- name: template inventory file
template:
src: inventory
dest: /tmp/ansible-tower-setup-bundle-{{ towerversion }}.el{{ ansible_distribution_major_version }}/inventory
dest: /tmp/ansible-tower-setup-bundle-{{ towerversion }}/inventory
when: towerchk != towerversion

- name: run the tower installer
shell: ./setup.sh chdir=/tmp/ansible-tower-setup-bundle-{{ towerversion }}.el{{ ansible_distribution_major_version }}
shell: ./setup.sh chdir=/tmp/ansible-tower-setup-bundle-{{ towerversion }}
when: towerchk not in towerversion

- name: wait for tower to be up
Expand Down
6 changes: 5 additions & 1 deletion roles/ansible-tower/templates/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ localhost ansible_connection=local
[database]

[all:vars]
admin_password='{{towerpass}}'
admin_password='{{ towerpass }}'
ignore_preflight_errors=true
{% if ansible_distribution != 'RedHat' %}
gpgcheck=false
{% endif %}

pg_host=''
pg_port=''
Expand Down
5 changes: 5 additions & 0 deletions roles/docs_setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
state: present
when: ansible_distribution_major_version|int < 8

- name: import remi gpg key
rpm_key:
state: present
key: https://rpms.remirepo.net/RPM-GPG-KEY-remi2018

- name: Setup Remi PHP 8 Repo
yum:
name: http://rpms.famillecollet.com/enterprise/remi-release-8.rpm
Expand Down
8 changes: 8 additions & 0 deletions roles/geerlingguy.gitlab/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
command: bash /tmp/gitlab_install_repository.sh
when: not gitlab_file.stat.exists

# disable the gpg validation for now
- name: disable repo validation for now
replace:
path: /etc/yum.repos.d/gitlab_gitlab-ce.repo
regexp: '^repo_gpgcheck=1'
replace: repo_gpgcheck=0
when: ansible_distribution_major_version|int == 7

- name: Define the Gitlab package name.
set_fact:
gitlab_package_name: "{{ gitlab_edition }}{{ gitlab_package_version_separator }}{{ gitlab_version }}"
Expand Down
9 changes: 8 additions & 1 deletion roles/gitlab-postconfig/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
- name: GitLab Post | Install pip
- name: GitLab Post | Install pip (RHEL7)
yum:
name: python-pip
state: present
when: ansible_distribution_major_version|int == 7

- name: GitLab Post | Install pip (RHEL8)
yum:
name: python3-pip
state: present
when: ansible_distribution_major_version|int == 8

- name: GitLab Post | Install pyapi-gitlab
pip:
Expand Down
2 changes: 1 addition & 1 deletion roles/gitlab-postconfig/templates/set_root_pw.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ user.reset_password_sent_at = nil
user.save!
user.unlock_access!
quit
" | gitlab-rails console production
" | gitlab-rails console
4 changes: 2 additions & 2 deletions roles/manage-ec2-instances/tasks/aws_check_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- "'_' in ec2_name_prefix"

- name: FIND AZ ZONE FOR REGION {{ ec2_region }}
aws_az_facts:
aws_az_info:
region: "{{ ec2_region }}"
register: az_names

Expand All @@ -27,7 +27,7 @@
ec2_az: "{{ az_names.availability_zones[0].zone_name }}"

- name: grab information about AWS user
aws_caller_facts:
aws_caller_info:
region: "{{ ec2_region }}"
register: whoami

Expand Down
17 changes: 10 additions & 7 deletions roles/manage-ec2-instances/tasks/find_ami_ids.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
---
- name: find ami id for rhel 7
ec2_ami_facts:
ec2_ami_info:
owners: 309956199498
filters:
name: "{{ ec2_image_names['rhel7'] }}"
architecture: x86_64
region: "{{ ec2_region }}"
register: rhel7_ami_find

- name: find ami id for rhel 8
ec2_ami_facts:
ec2_ami_info:
owners: 309956199498
filters:
name: "{{ ec2_image_names['rhel8'] }}"
architecture: x86_64
region: "{{ ec2_region }}"
register: rhel8_ami_find

- name: find ami id for centos 7
ec2_ami_facts:
ec2_ami_info:
owners: aws-marketplace
filters:
name: "{{ ec2_image_names['centos7'] }}"
architecture: x86_64
region: "{{ ec2_region }}"
register: centos7_ami_find

- name: find ami for windows 2016 core
ec2_ami_facts:
ec2_ami_info:
filters:
name: "{{ ec2_image_names['win2016_core'] }}"
region: "{{ ec2_region }}"
register: win2016_core_ami_find

- name: find ami for windows 2016 full
ec2_ami_facts:
ec2_ami_info:
filters:
name: "{{ ec2_image_names['win2016_full'] }}"
region: "{{ ec2_region }}"
register: win2016_full_ami_find

- name: find ami for windows 2019 core
ec2_ami_facts:
ec2_ami_info:
filters:
name: "{{ ec2_image_names['win2019_core'] }}"
region: "{{ ec2_region }}"
register: win2019_core_ami_find

- name: find ami for windows 2019 full
ec2_ami_facts:
ec2_ami_info:
filters:
name: "{{ ec2_image_names['win2019_full'] }}"
region: "{{ ec2_region }}"
Expand Down
18 changes: 9 additions & 9 deletions roles/manage-ec2-instances/tasks/teardown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Get the VPC ID for {{ name_prefix }}
ec2_vpc_net_facts:
ec2_vpc_net_info:
filters:
"tag:Name": "{{ name_prefix }}-vpc"
region: "{{ ec2_region }}"
Expand All @@ -12,15 +12,15 @@
when: vpc_net_facts.vpcs|length > 0

- name: grab route information for {{ ec2_name_prefix }} on {{ ec2_region }}
ec2_vpc_route_table_facts:
ec2_vpc_route_table_info:
region: "{{ ec2_region }}"
filters:
vpc_id: "{{ ec2_vpc_id }}"
register: route_table_facts
when: vpc_net_facts.vpcs|length > 0

- name: grab information about AWS user
aws_caller_facts:
aws_caller_info:
region: "{{ ec2_region }}"
register: whoami

Expand All @@ -30,7 +30,7 @@

# ----------------------- Destroy Tower Instances -----------------------
- name: Get ec2 Tower instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand All @@ -49,7 +49,7 @@

# ----------------------- Destroy Gitlab Instances -----------------------
- name: Get ec2 Gitlab instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand Down Expand Up @@ -79,7 +79,7 @@

# ----------------------- Destroy Docs Instances -----------------------
- name: Get ec2 Docs instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand Down Expand Up @@ -123,7 +123,7 @@

# ----------------------- Destroy DC Instances -----------------------
- name: Get ec2 DC instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand All @@ -141,7 +141,7 @@

# ----------------------- Destroy Windows Instances -----------------------
- name: Get ec2 Windows instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand All @@ -160,7 +160,7 @@

# ----------------------- Destroy Workstation Instances -----------------------
- name: Get ec2 Workstation instance information
ec2_instance_facts:
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
vpc-id: "{{ ec2_vpc_id }}"
Expand Down
3 changes: 0 additions & 3 deletions roles/manage-ovirt-instances/tasks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
cloud_init:
nic_boot_protocol: dhcp
nic_name: eth0
nic_on_boot: true
host_name: gitlab
user_name: "{{ root_user }}"
root_password: "{{ root_password }}"
Expand Down Expand Up @@ -74,7 +73,6 @@
cloud_init:
nic_boot_protocol: dhcp
nic_name: eth0
nic_on_boot: true
host_name: docs
user_name: "{{ root_user }}"
root_password: "{{ root_password }}"
Expand Down Expand Up @@ -102,7 +100,6 @@
cloud_init:
nic_boot_protocol: dhcp
nic_name: eth0
nic_on_boot: true
host_name: "s{{ item }}-tower"
user_name: "{{ root_user }}"
root_password: "{{ root_password }}"
Expand Down
Loading