Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECE Ansible does not use consistent groups across tasks #115

Open
nerophon opened this issue Mar 15, 2021 · 1 comment
Open

ECE Ansible does not use consistent groups across tasks #115

nerophon opened this issue Mar 15, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@nerophon
Copy link
Contributor

ECE 2.7

We've identified an issue where the default users and groups that Ansible provisions do not align with the user & group then used in other tasks.

The task in tasks/base/general/make_user.yml defines the group "elastic" and "docker" - Elastic then ends up being the primary group from what we can see.

But in the download step under tasks/ece-bootstrap/main.yml it tries to then set the group ownership of the file to elastic_user_group - which does not exist and was never created.

@nerophon nerophon added the bug Something isn't working label Mar 15, 2021
@alexsuppanz
Copy link
Contributor

alexsuppanz commented May 23, 2021

Hi @nerophon
I just came across your issue and tried to verify that. These are the corresponding code lines where the user 'elastic' with the primary group 'elastic' is added to the local 'docker' group

- name: Add user elastic
user:
name: elastic
group: elastic
groups: docker
append: yes
state: present
generate_ssh_key: true
when: getent_passwd["elastic"] == none
- name: Modify user elastic to be included in groups
user:
name: elastic
groups: docker
append: yes
when: getent_passwd["elastic"] != none

But in the affected file where the wrong group permission should be set I did not find the group you mentioned (I think this is the download task you mentioned)

- name: Download ece installer
get_url:
url: "{{ ece_installer_url }}"
dest: /home/elastic/elastic-cloud-enterprise.sh
mode: 0755

Doing a quick search I can not find a variable called 'elastic_user_group'. Are you using an old version of this playbook to install ECE 2.7?

Regards,
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants