Replies: 1 comment
-
solved it, didn't have a ansible vault file in my repo containing the correct server sudo credentials. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a problem.
I've set up Ansible Semaphore on a server with docker-compose.
when i try to become root with my root credentials, id doesn't work.
the code for the playbook i use:
the log output when i run it:
output 1.txt
` 12:46:42 PM
Task 56 added to queue
12:46:43 PM
Started: 56
12:46:43 PM
Run TaskRunner with template: update-apt-packages
12:46:43 PM
Preparing: 56
12:46:43 PM
git stuff
12:46:44 PM
Updating
12:46:44 PM
Fast-forward
12:46:44 PM
update-apt-packages.yaml | 2 +-
12:46:44 PM
1 file changed, 1 insertion(+), 1 deletion(-)
12:46:44 PM
installing static inventory
12:46:44 PM
No collections/requirements.yml file found. Skip galaxy install process.
12:46:44 PM
No roles/requirements.yml file found. Skip galaxy install process.
12:46:45 PM
12:46:45 PM
PLAY [all] *********************************************************************
12:46:45 PM
12:46:45 PM
TASK [Gathering Facts] *********************************************************
12:46:47 PM
ok: [IPv4 SERVER!]
12:46:47 PM
ok: [IPv4 SERVER2!]
12:46:47 PM
12:46:47 PM
TASK [Check effective user ID] *************************************************
12:46:47 PM
changed: [IPv4 SERVER!]
12:46:47 PM
changed: [IPv4 SERVER2!]
12:46:47 PM
12:46:47 PM
TASK [Print effective user ID] *************************************************
12:46:47 PM
ok: [IPv4 SERVER2!] => {
12:46:47 PM
"msg": "Effective UID is 1002"
12:46:47 PM
}
12:46:47 PM
ok: [IPv4 SERVER!] => {
12:46:47 PM
"msg": "Effective UID is 1002"
12:46:47 PM
}
12:46:47 PM
12:46:47 PM
TASK [Test root access] ********************************************************
12:46:48 PM
changed: [IPv4 SERVER!]
12:46:48 PM
changed: [IPv4 SERVER2!]
12:46:48 PM
12:46:48 PM
TASK [Print whoami result] *****************************************************
12:46:48 PM
ok: [IPv4 SERVER2!] => {
12:46:48 PM
"whoami_output.stdout": "admin"
12:46:48 PM
}
12:46:48 PM
ok: [IPv4 SERVER!] => {
12:46:48 PM
"whoami_output.stdout": "admin"
12:46:48 PM
}
12:46:48 PM
12:46:48 PM
TASK [Update and upgrade apt packages] *****************************************
12:46:48 PM
changed: [IPv4 SERVER2!]
12:46:48 PM
changed: [IPv4 SERVER!]
12:46:48 PM
12:46:48 PM
TASK [test1234] ****************************************************************
12:46:48 PM
ok: [IPv4 SERVER2!] => {
12:46:48 PM
"whoami_output.stdout": "admin"
12:46:48 PM
}
12:46:48 PM
ok: [IPv4 SERVER!] => {
12:46:48 PM
"whoami_output.stdout": "admin"
12:46:48 PM
}
12:46:48 PM
12:46:48 PM
PLAY RECAP *********************************************************************
12:46:48 PM
IPv4 SERVER! : ok=7 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
12:46:48 PM
IPv4 SERVER2! : ok=7 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 `
at least at the second whoami should i be root. not admin.
the following pictures show how i set it up:
vault:
workspace
inventory
and job configuration
has anyone an idea why i can't become root over the normal way and doesn't execute the instruction properly?
can it be that semaphore doesnt use the vault when it should be?
Beta Was this translation helpful? Give feedback.
All reactions