diff --git a/facts/miner/system.yml b/facts/miner/system.yml index 519e319..fa1df2f 100644 --- a/facts/miner/system.yml +++ b/facts/miner/system.yml @@ -33,9 +33,8 @@ - name: Miner | Facts | System | nanominer 1 set_fact: nanominer_home: "{{ user_mfn.home }}/nanominer" - nanominer_version: "3.3.13" # Download link: https://github.com/nanopool/nanominer/releases + nanominer_version: "3.4.3" # Download link: https://github.com/nanopool/nanominer/releases nanominer_script: "{{ user_mfn.home }}/nanominer.sh" - nanominer_tar_remote: "InstallFiles/Miners/nanominer/*.tar.gz" - name: Miner | Facts | System | nanominer 2 set_fact: diff --git a/hosts b/hosts index dfee6a4..81cf5fd 100644 --- a/hosts +++ b/hosts @@ -8,6 +8,7 @@ localhost dell-laptop branch=dev airbook branch=dev x570 branch=dev +test branch=dev [workstation] ;;;;;;; Available options - all require lowercase values ;;;;;; @@ -93,12 +94,16 @@ x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu ; hugo : Set to anything to install HUGO static website generator. ; Example: true ; -; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features -; ce - Installs Community Edition. Excludes paid features if you'll never use them. Sepposedly difficult to move to EE. +; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features. +; ce - Installs Community Edition. Excludes paid features if you'll never use them. Supposedly difficult to move to EE. ; Example: ce ; +; gitlab_url : The URL prefix for the server. Using 'http://mygitlabserver' would result in "http://mygitlabserver.{{domain}}". +; Regardless of whether you choose http or https, the Certbot config will be skipped since the maintainer uses a reverse proxy. +; Example: https://gitlab +; onlyoffice domain=hyperling.com onlyoffice=true -grafana domain=hyperling.com grafana=true influxdb1=true +grafana domain=hyperling.com grafana=true influxdb1=true test hyperling certbot=true hyperling.com certbot=true @@ -108,5 +113,5 @@ reverse-proxy certbot=true nextcloud wordpress certbot=true usb-server -gitlab gitlab=ce domain=hyperling.com -gitlab2 gitlab=ce domain=hyperling.com +git gitlab=ce domain=hyperling.com gitlab_url=https://git +gitlab gitlab=ce domain=hyperling.com gitlab_url=https://gitlab diff --git a/local.yml b/local.yml index a0f5879..837a0fc 100644 --- a/local.yml +++ b/local.yml @@ -18,6 +18,9 @@ - include: tasks/general/software/packages.yml - include: tasks/general/software/services.yml ignore_errors: yes + - include: tasks/general/software/sendmail.yml + ignore_errors: yes + when: ansible_system == "FreeBSD" - include: facts/general/gather.yml diff --git a/tasks/general/finish.yml b/tasks/general/finish.yml index 8e656b0..6b24074 100644 --- a/tasks/general/finish.yml +++ b/tasks/general/finish.yml @@ -4,6 +4,8 @@ - name: General | Finish | Ansible Pull Report | Finish File shell: "echo 'FINISH' >> {{ ansible_pull_report }}" + when: leet_drive_details.stat.exists - name: General | Finish | Ansible Pull Report | Add Date Entry - shell: "date >> {{ ansible_pull_report }}" \ No newline at end of file + shell: "date >> {{ ansible_pull_report }}" + when: leet_drive_details.stat.exists diff --git a/tasks/general/software/sendmail.yml b/tasks/general/software/sendmail.yml new file mode 100644 index 0000000..8bde16c --- /dev/null +++ b/tasks/general/software/sendmail.yml @@ -0,0 +1,47 @@ +--- +# Ensure /var/spool/clientmque folder doesn't overflow. +# Preferably only on servers that don't already have postfix? + +- name: Server | Sendmail | Variables + set_fact: + sendmail: sendmail + sendmail_queue: sendmail_msp_queue + +- name: Server | Sendmail | Check + shell: which postfix + register: postfix + +- name: Server | Sendmail | Install + package: + name: + - "{{ sendmail }}" + state: present + when: postfix.failed + +- name: Server | Sendmail | Configure + blockinfile: + path: /etc/rc.conf + block: | + sendmail_enable="YES" + sendmail_msp_queue_enable="YES" + marker: "# {mark} MANAGED BY ANSIBLE - sendmail" + state: present + create: yes + backup: yes + when: postfix.failed and ansible_system == "FreeBSD" + +- name: Server | Sendmail | Enable + Start | Main + service: + name: "{{ sendmail }}" + pattern: "{{ sendmail }}" + state: started + enabled: yes + when: postfix.failed + +- name: Server | Sendmail | Enable + Start | Queue + service: + name: "{{ sendmail_queue }}" + pattern: "{{ sendmail_queue }}" + state: started + enabled: yes + when: postfix.failed and ansible_system == "FreeBSD" diff --git a/tasks/general/software/telegraf.yml b/tasks/general/software/telegraf.yml index b518e46..10665c3 100644 --- a/tasks/general/software/telegraf.yml +++ b/tasks/general/software/telegraf.yml @@ -6,7 +6,7 @@ - name: General | Telegraf | Variables 1/4 set_fact: - telegraf_tar: telegraf-1.18.0_linux_amd64.tar.gz + telegraf_tar: telegraf-1.20.3_linux_amd64.tar.gz telegraf_path: /usr/local/bin telegraf_config_path: /usr/local/etc telegraf_user: "{{ user_ansible.name }}" diff --git a/tasks/server/software/gitlab.yml b/tasks/server/software/gitlab.yml index c81e776..6c2fed0 100644 --- a/tasks/server/software/gitlab.yml +++ b/tasks/server/software/gitlab.yml @@ -3,15 +3,19 @@ ## Checks ## -- name: "Server | Software | GitLab | Checks | Host Variable: {{ gitlab }}" +- name: "Server | Software | GitLab | Checks | Host Variable [gitlab]={{ gitlab }}" shell: echo "ERROR! Variable has an invalid value!" && exit 1 when: gitlab not in ("ee", "ce") +- name: "Server | Software | GitLab | Checks | Host Variable [gitlab_url]={{ gitlab_url }}" + set_fact: + gitlab_url: "https://gitlab" + when: gitlab_url is not defined + - name: Server | Software | GitLab | Checks | Play Variables set_fact: gitlab_bundle: "gitlab-{{ gitlab }}" gitlab_config: /etc/gitlab/gitlab.rb - gitlab_url_prefix: "https://git" # Ensure other version is not installed. - name: Server | Software | GitLab | Checks | Remove EE @@ -58,7 +62,7 @@ when: gitlab_installed.failed and ansible_pkg_mgr == "dnf" - name: Server | Software | GitLab | Install | Install - shell: EXTERNAL_URL="{{ gitlab_url_prefix }}.{{ domain }}" {{ ansible_pkg_mgr }} install -y {{ gitlab_bundle }} + shell: EXTERNAL_URL="{{ gitlab_url | replace("https","http") }}.{{ domain }}" {{ ansible_pkg_mgr }} install -y {{ gitlab_bundle }} when: gitlab_installed.failed - name: Server | Software | GitLab | Install | Get Password @@ -78,11 +82,11 @@ # Need to make server think it's https but not actually listen for it, otherwise reverse proxy doesn't work. # https://www.itsfullofstars.de/2019/06/gitlab-behind-a-reverse-proxy/ -- name: Server | Software | GitLab | Configure |Check External URL +- name: Server | Software | GitLab | Configure | Check External URL lineinfile: path: "{{ gitlab_config }}" regexp: '^external_url ' - line: "external_url '{{ gitlab_url_prefix }}.{{ domain }}' # Managed by Ansible" + line: "external_url '{{ gitlab_url }}.{{ domain }}' # Managed by Ansible" state: present create: yes backup: yes