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

Run ensure system is prepared from root user #64

Closed
wants to merge 1 commit into from
Closed

Run ensure system is prepared from root user #64

wants to merge 1 commit into from

Conversation

patsevanton
Copy link

Fix #63

I checked

PLAY [Install zabbix server and web] ***************************************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************************************************************
Monday 11 April 2022  15:42:37 +0600 (0:00:00.007)       0:00:00.007 **********
ok: [zabbix]

TASK [Update apt cache.] ***************************************************************************************************************************************************************
Monday 11 April 2022  15:42:42 +0600 (0:00:04.398)       0:00:04.406 **********
changed: [zabbix]

TASK [Remove 127.0.1.1 from /etc/hosts] ************************************************************************************************************************************************
Monday 11 April 2022  15:43:14 +0600 (0:00:31.912)       0:00:36.318 **********
changed: [zabbix]

TASK [robertdebock.bootstrap : Validating arguments against arg spec 'main' - Prepare a system to be managed by Ansible.] **************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:02.725)       0:00:39.044 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : test if bootstrap_wait_for_host is set correctly] *******************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.012)       0:00:39.056 **********
ok: [zabbix -> localhost]

TASK [robertdebock.bootstrap : test if bootstrap_timeout is set correctly] *************************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.018)       0:00:39.075 **********
ok: [zabbix -> localhost]

TASK [robertdebock.bootstrap : wait for port to be available] **************************************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.015)       0:00:39.091 **********
skipping: [zabbix]

TASK [robertdebock.bootstrap : test connection] ****************************************************************************************************************************************
Monday 11 April 2022  15:43:17 +0600 (0:00:00.022)       0:00:39.113 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : gather ansible facts] ***********************************************************************************************************************************
Monday 11 April 2022  15:43:18 +0600 (0:00:01.792)       0:00:40.906 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : install bootstrap packages (package)] *******************************************************************************************************************
Monday 11 April 2022  15:43:20 +0600 (0:00:01.674)       0:00:42.580 **********
ok: [zabbix] => (item=python3)
ok: [zabbix] => (item=sudo)
ok: [zabbix] => (item=gnupg)
ok: [zabbix] => (item=python3-apt)

PLAY RECAP *****************************************************************************************************************************************************************************
zabbix                     : ok=9    changed=2    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0

name: Pull request
about: Describe the proposed change


Describe the change
A clear and concise description of what the pull request is.

Testing
In case a feature was added, how were tests performed?

Fix #63

I checked

```
PLAY [Install zabbix server and web] ***************************************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************************************************************
Monday 11 April 2022  15:42:37 +0600 (0:00:00.007)       0:00:00.007 **********
ok: [zabbix]

TASK [Update apt cache.] ***************************************************************************************************************************************************************
Monday 11 April 2022  15:42:42 +0600 (0:00:04.398)       0:00:04.406 **********
changed: [zabbix]

TASK [Remove 127.0.1.1 from /etc/hosts] ************************************************************************************************************************************************
Monday 11 April 2022  15:43:14 +0600 (0:00:31.912)       0:00:36.318 **********
changed: [zabbix]

TASK [robertdebock.bootstrap : Validating arguments against arg spec 'main' - Prepare a system to be managed by Ansible.] **************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:02.725)       0:00:39.044 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : test if bootstrap_wait_for_host is set correctly] *******************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.012)       0:00:39.056 **********
ok: [zabbix -> localhost]

TASK [robertdebock.bootstrap : test if bootstrap_timeout is set correctly] *************************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.018)       0:00:39.075 **********
ok: [zabbix -> localhost]

TASK [robertdebock.bootstrap : wait for port to be available] **************************************************************************************************************************
Monday 11 April 2022  15:43:16 +0600 (0:00:00.015)       0:00:39.091 **********
skipping: [zabbix]

TASK [robertdebock.bootstrap : test connection] ****************************************************************************************************************************************
Monday 11 April 2022  15:43:17 +0600 (0:00:00.022)       0:00:39.113 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : gather ansible facts] ***********************************************************************************************************************************
Monday 11 April 2022  15:43:18 +0600 (0:00:01.792)       0:00:40.906 **********
ok: [zabbix]

TASK [robertdebock.bootstrap : install bootstrap packages (package)] *******************************************************************************************************************
Monday 11 April 2022  15:43:20 +0600 (0:00:01.674)       0:00:42.580 **********
ok: [zabbix] => (item=python3)
ok: [zabbix] => (item=sudo)
ok: [zabbix] => (item=gnupg)
ok: [zabbix] => (item=python3-apt)

PLAY RECAP *****************************************************************************************************************************************************************************
zabbix                     : ok=9    changed=2    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
```
@dgibbs64
Copy link
Sponsor

I am also getting this issue


failed: [hostname] (item=python3-apt) => {"ansible_loop_var": "item", "changed": false, "item": "python3-apt", "msg": "'/usr/bin/apt-mark manual python3-apt' failed: E: Could not create temporary file for /var/lib/apt/extended_states - mkstemp (13: Permission denied)\nE: Failed to write temporary StateFile /var/lib/apt/extended_states\n", "rc": 100, "stderr": "E: Could not create temporary file for /var/lib/apt/extended_states - mkstemp (13: Permission denied)\nE: Failed to write temporary StateFile /var/lib/apt/extended_states\n", "stderr_lines": ["E: Could not create temporary file for /var/lib/apt/extended_states - mkstemp (13: Permission denied)", "E: Failed to write temporary StateFile /var/lib/apt/extended_states"], "stdout": "", "stdout_lines": []}

@jacobemery
Copy link

Request to re-open this PR, same problem for RHEL 8:

failed: [hostname] (item=python3) => {"ansible_loop_var": "item", "changed": false, "item": "python3", "msg": "This command has to be run under the root user.", "results": []}
failed: [hostname] (item=sudo) => {"ansible_loop_var": "item", "changed": false, "item": "sudo", "msg": "This command has to be run under the root user.", "results": []}

Changed robertdebock.bootstrap/tasks/main.yaml, last task, install bootstrap packages (package) from:
"become: no"
to
"become: True"
and everything worked swimmingly.

@frock81
Copy link

frock81 commented Aug 1, 2022

+1 for Ubuntu Focal (Issue 63).

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install bootstrap packages mkstemp (13: Permission denied)
4 participants