ti-mo / ansible-lanparty

Collection of integrated Ansible roles used to run LAN events.
GNU General Public License v3.0
136 stars 12 forks source link

Ubuntu18: Could not create temporary file for /var/lib/apt/extended_states #31

Closed alexjorgef closed 5 years ago

alexjorgef commented 5 years ago

I have a fresh Ubuntu18 system and try to run this on my laptop to test, i run this command:

ansible-playbook -i inventory.ini playbook.yml --ask-sudo-pass

playbook.yml:

---
- hosts: all
  roles:
    - lp-steam

inventory.ini:

[local]
127.0.0.1 ansible_connection=local

Error:

[DEPRECATION WARNING]: The sudo command line option has been deprecated in favor of the "become" command line arguments. This feature will be 
removed in version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
SUDO password: 

PLAY [all] ***************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************
ok: [127.0.0.1]

TASK [lp-steam : Install | Add i386 Architecture] ************************************************************************************************
ok: [127.0.0.1]

TASK [lp-steam : Install | Update APT Cache for i386] ********************************************************************************************
skipping: [127.0.0.1]

TASK [lp-steam : Install | (lib32) Packages] *****************************************************************************************************
[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple 
items and specifying `name: "{{ item }}"`, please use `name: ['lib32gcc1', 'libcurl3:i386', 'libssl1.0.0:i386', 'libstdc++6:i386']` and remove 
the loop. This feature will be removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in 
ansible.cfg.
failed: [127.0.0.1] (item=[u'lib32gcc1', u'libcurl3:i386', u'libssl1.0.0:i386', u'libstdc++6:i386']) => {"changed": false, "item": ["lib32gcc1", "libcurl3:i386", "libssl1.0.0:i386", "libstdc++6:i386"], "msg": "'/usr/bin/apt-mark manual lib32gcc1 libcurl3:i386 libssl1.0.0:i386 libstdc++6:i386' 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": "lib32gcc1 can not be marked as it is not installed.\nlibcurl3:i386 can not be marked as it is not installed.\nlibssl1.0.0:i386 can not be marked as it is not installed.\nlibstdc++6:i386 set to manually installed.\n", "stdout_lines": ["lib32gcc1 can not be marked as it is not installed.", "libcurl3:i386 can not be marked as it is not installed.", "libssl1.0.0:i386 can not be marked as it is not installed.", "libstdc++6:i386 set to manually installed."]}
    to retry, use: --limit @/home/alex1a/ProgrammingFiles/ansible-lanparty/playbook.retry

PLAY RECAP ***************************************************************************************************************************************
127.0.0.1                  : ok=2    changed=0    unreachable=0    failed=1 
alexjorgef commented 5 years ago

anyone can run on a local machine ?

ti-mo commented 5 years ago

Hi @alex1a, as you can see this repository hasn't had any attention for the past 2 years and only serves as an academic example at this point. :slightly_smiling_face: It's unlikely that this role in particular (lp-steam) will still work as intended after all this time. Feel free to try, though, it might still work.

As to the issue you're seeing here, you're missing a become statement in your playbook.yml, for the same reason you need root/sudo to successfully run apt-get install from your shell.