Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

dwardoric@chaos.socialD

dwardoric@chaos.social

@dwardoric@chaos.social
About
Posts
7
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

View Original

Posts

Recent Best Controversial

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @badnetmask @davdr The really sad thing is that I could solve it with a couple of lines shell-script. πŸ˜‰
    Maybe I should just print out a note at the end of the ansible run to do so. πŸ˜…

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @badnetmask @davdr They use become which is not sufficient as we discussed. The root cause seems to be systemd not being able to talk to dbus because dbus will not be started when using become. I'm still investigating machinectl. The sledgehammer method would of course be doing all the symlink magic systemd does via script but I'd like to not have a "hacky, against the system" solution. πŸ˜‰

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @davdr @badnetmask Thanks but I need to run the play multiple times for different users. I can simply split out the user creation into another play but still cannot run the user specific stuff in a loop because this doesn't seem possible AFAIK. Looping over tasks doesn't use remote_user and looping over play_include is not supported. 😞

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @davdr There is a step running "loginctl enable-linger"

    Everything is fine when I simply connect as the user (setting "remote_user"). However that only allows one "service setup" per host. Also I try to not hack my way around ansible but so far I fear that this use case is just not existent in its scope.

    I hope "become_method: machinectl" will help.

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @davdr Sadly using that approach ends up with exactly the same error. So I guess I will take a stab at machinectl.

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    @davdr Thanks, I'll take a look.

    Automation ansible provisioning sysadmin

  • I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?
    dwardoric@chaos.socialD dwardoric@chaos.social

    I know this is a long shot but: Is there a way to loop over a set of tasks in ansible and changing "remote_user" (not "become_user")?

    Background: SystemD user commands don't work via "become".

    I've read about "become: machinectl" but want to ensure if I really need to open another can of worms.

    #Ansible #provisioning #sysadmin

    Automation ansible provisioning sysadmin
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups