Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
chore: code changes to test jenkins upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza Kazmi authored and Hamza Kazmi committed Aug 16, 2023
1 parent 1f6b89f commit f95b6f2
Show file tree
Hide file tree
Showing 10 changed files with 502 additions and 485 deletions.
46 changes: 23 additions & 23 deletions playbooks/jenkins_data_engineering_new.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
- name: Bootstrap instance(s)
hosts: all
gather_facts: no
become: True
roles:
- python
# - name: Bootstrap instance(s)
# hosts: all
# gather_facts: no
# become: True
# roles:
# - python

- name: Mount EBS
hosts: all
become: True
vars:
volumes: "{{ JENKINS_VOLUMES }}"
roles:
- mount_ebs
# - name: Mount EBS
# hosts: all
# become: True
# vars:
# volumes: "{{ JENKINS_VOLUMES }}"
# roles:
# - mount_ebs

- name: Configure instance(s)
hosts: all
Expand All @@ -23,17 +23,17 @@
COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE: True
COMMON_SECURITY_UPDATES: yes
SECURITY_UPGRADE_ON_ANSIBLE: true
ansible_distribution_release: bionic
ansible_distribution_release: focal

roles:
- role: aws
when: COMMON_ENABLE_AWS_ROLE
- docker-tools
# - role: aws
# when: COMMON_ENABLE_AWS_ROLE
# - docker-tools
- jenkins_data_engineering_new
- role: newrelic_infrastructure
when: COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE
tags:
- newreliconly
- role: aws_cloudwatch_agent
tags:
- cloudwatch
# when: COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE
# tags:
# - newreliconly
# - role: aws_cloudwatch_agent
# tags:
# - cloudwatch
10 changes: 5 additions & 5 deletions playbooks/roles/common/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
dependencies:
- common_vars
- server_utils
- role: user
user_info: "{{ COMMON_USER_INFO }}"
- role: security
when: COMMON_SECURITY_UPDATES
# - server_utils
# - role: user
# user_info: "{{ COMMON_USER_INFO }}"
# - role: security
# when: COMMON_SECURITY_UPDATES
8 changes: 4 additions & 4 deletions playbooks/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@
src: "{{ item.src }}"
owner: root
group: root
mode: "{{ item.mode | default(0644) }}"
mode: "{{ item.mode }}"
register: config_templates
with_items:
- { src: 'edx_rsyslog.j2', dest: '/etc/rsyslog.d/99-edx.conf' }
- { src: 'etc/logrotate.d/hourly/edx_logrotate.j2', dest: '/etc/logrotate.d/hourly/edx-services' }
- { src: 'edx_rsyslog.j2', dest: '/etc/rsyslog.d/99-edx.conf', mode: '0644' }
- { src: 'etc/logrotate.d/hourly/edx_logrotate.j2', dest: '/etc/logrotate.d/hourly/edx-services', mode: '0644' }
- { src: 'etc/cron.hourly/logrotate.j2', dest: '/etc/cron.hourly/logrotate', mode: '0555' }
- { src: 'etc/logrotate.d/hourly/edx_logrotate_tracking_log.j2', dest: '/etc/logrotate.d/hourly/tracking.log' }
- { src: 'etc/logrotate.d/hourly/edx_logrotate_tracking_log.j2', dest: '/etc/logrotate.d/hourly/tracking.log', mode: '0644' }

- name: Are we in a Docker container
shell: echo $(egrep -q 'docker' /proc/self/cgroup && echo 'yes' || echo 'no')
Expand Down
38 changes: 19 additions & 19 deletions playbooks/roles/jenkins_common/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
dependencies:
- common
- role: nginx
nginx_app_dir: "/etc/nginx"
nginx_log_dir: "/var/log/nginx"
nginx_data_dir: "{{ nginx_app_dir }}"
nginx_conf_dir: "{{ nginx_app_dir }}/conf.d"
nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available"
nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled"
nginx_server_static_dir: "{{ nginx_data_dir }}/server-static"
nginx_htpasswd_file: "{{ nginx_app_dir }}/nginx.htpasswd"
nginx_default_sites: "jenkins"
nginx_sites: jenkins
jenkins_nginx_port: "{{ jenkins_common_nginx_port }}"
jenkins_server_name: "{{ JENKINS_SERVER_NAME }}"
jenkins_port: "{{ jenkins_common_port }}"
jenkins_protocol_https: "{{ jenkins_common_protocol_https }}"
tags: jenkins:promote-to-production
- role: oraclejdk
tags: java
# - common
# - role: nginx
# nginx_app_dir: "/etc/nginx"
# nginx_log_dir: "/var/log/nginx"
# nginx_data_dir: "{{ nginx_app_dir }}"
# nginx_conf_dir: "{{ nginx_app_dir }}/conf.d"
# nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available"
# nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled"
# nginx_server_static_dir: "{{ nginx_data_dir }}/server-static"
# nginx_htpasswd_file: "{{ nginx_app_dir }}/nginx.htpasswd"
# nginx_default_sites: "jenkins"
# nginx_sites: jenkins
# jenkins_nginx_port: "{{ jenkins_common_nginx_port }}"
# jenkins_server_name: "{{ JENKINS_SERVER_NAME }}"
# jenkins_port: "{{ jenkins_common_port }}"
# jenkins_protocol_https: "{{ jenkins_common_protocol_https }}"
# tags: jenkins:promote-to-production
# - role: oraclejdk
# tags: java
Loading

0 comments on commit f95b6f2

Please sign in to comment.