Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 60a1d39

Browse files
authored
Bug fixes pr 2.x (#2717)
* Fixing installer variable bug. * Fixing tests for external PRs. * Testing with a fork. * Adding repo owner's username into installer string. * Refactoring config repo detection to simplify. * No longer permitted to use an integer as a truthy value. * No longer permitted to use existence check as a truthy value. * Can't see a reason why linotp var shouldn't be a boolean. * No longer permitted to use existence check as a truthy value. * Fixing truthy errors in ce_deploy role. * No longer permitted to use an integer as a truthy value. * Updating clamav command to use flock avoiding duplicate processes running. * More truthy length fixes. * Fixing more LDAP role truthy issues. * Slight block refactor for LDAP. * DN length check should not be negated. * Forgot to add the length filter. * Another boolean Ansible 12 error in AMI role. * ALB port must be cast as a string for RedirectAction. * Setting the correct Jinja filter, it's string, not str. * Fixing more Ansible 12 length issues in autoscale role. * Simplifying ASG role by refactoring into blocks. * Further simplifying ASG CloudFront block. * Scaling rules refactor needs work. * Scaling policies list needs to be defined in case it is empty and we try to concatenate. * Enhancing installer to accept an Ansible version and putting Ansible 12 back into GitHub Actions containers. * Trying a different approach to defaulting the venv username. * Removing default() filter from python_pip_packages role. * Fixing up the ce_ansible role for Ansible 12. * Removing unnecessary from_json filter from CloudFront acc ID lookup. * Trying to fix AWS standalone builds. * Fixing standalone EC2 playbooks. * Adding hostname print out for debug. * Adding back in the hostname check. * Fixing AWS hostname variable in comparisons. * Trying to find a hostname variation that meets all requirements. * Adding both hostnames to ec2.yml.
1 parent 7cb9bae commit 60a1d39

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

plays/aws_ec2_standalone/ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# First step. Spin up a "blank" instance and add the controller user and Ansible via user-data.
3-
- hosts: "{{ _aws_resource_name }}"
3+
- hosts: "{{ _aws_resource_name }}, _{{ _aws_resource_name | regex_replace('-', '_') }}"
44
connection: local
55
become: false
66

plays/aws_ec2_standalone/launch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
ansible.builtin.add_host:
2828
name: "{{ _aws_resource_name }}"
2929
groups: "_new_servers"
30-
when: _aws_hostname | length == 0
30+
when: _aws_hostname|length == 0
3131
- ansible.builtin.import_role:
3232
name: _exit

roles/aws/aws_ec2_with_eip/tasks/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
with_inventory_hostnames:
1818
- "_{{ aws_ec2_with_eip.hostname|regex_replace('-', '_') }}"
1919

20+
- name: Check the hostname.
21+
ansible.builtin.debug:
22+
msg: "Ansible hostname set to: {{ _aws_hostname }}"
23+
2024
# Subnet ID is stored in ce-provision's data directory
2125
- name: Ensure server data directory exists.
2226
ansible.builtin.file:
@@ -105,7 +109,7 @@
105109
msg: "No AMI found using the provided filters, exiting!"
106110
when: _aws_ec2_with_eip_ami_images.images | length == 0
107111

108-
# Do not create an instance if _aws_hostname is not an EC2 generated address unless `force: true`
112+
# Create an instance if _aws_hostname is set (it cannot be unless there is an EC2 generated address in a tagged hostgroup) unless `force: true`
109113
- name: Create new EC2 instance.
110114
amazon.aws.ec2_instance:
111115
profile: "{{ aws_ec2_with_eip.aws_profile }}"

0 commit comments

Comments
 (0)