Skip to content

Make project and private data directories 0o700#16119

Open
Kriskras99 wants to merge 1 commit intoansible:develfrom
Kriskras99:mkdirs_mode
Open

Make project and private data directories 0o700#16119
Kriskras99 wants to merge 1 commit intoansible:develfrom
Kriskras99:mkdirs_mode

Conversation

@Kriskras99
Copy link
Copy Markdown

SUMMARY

Python's os.mkdir creates directories with 0o777 by default. When the project directory is created on the fly by AWX this results in the following warning:

[WARNING] Ansible is being run in a world writable directory (/...),
ignoring it as an ansible.cfg source. For more information see ...

This makes the project and private data directories only readable by the user that AWX is running as.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • Other

@jessicamack
Copy link
Copy Markdown
Member

Hello @Kriskras99, thank you for the PR. Is there a specific issue you mean to address with this PR?

Python's `os.mkdir` creates directories with 0o777 by default. When the
project directory is created on the fly by AWX this results in the
following warning:

```
[WARNING] Ansible is being run in a world writable directory (/...),
ignoring it as an ansible.cfg source. For more information see ...
```

This makes the project and private data directories only readable by
the user that AWX is running as.

Signed-off-by: Kriskras99 <github@kriskras99.nl>
@sonarqubecloud
Copy link
Copy Markdown

@Kriskras99
Copy link
Copy Markdown
Author

Hello @jessicamack, every AWX job we run throws the following warning:

[WARNING] Ansible is being run in a world writable directory (/...),
ignoring it as an ansible.cfg source. For more information see ...

As mentioned in the PR description, this is caused by AWX setting incorrect directory permissions when copying the repository to the worker. It prevents us from configuring settings in ansible.cfg in our repo.

Some of these settings can still be set in group_vars/all with ansible_xxx variables, but not all settings are available this way. So it would greatly benefit us if we could use ansible.cfg the same way in AWX as we do locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants