Execution
Date 15 Dec 2025 09:38:00 +0000
Duration 00:17:22.68
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.3
Summary
18 Hosts
603 Tasks
2798 Results
18 Plays
138 Files
0 Records

Task result details


Field Value
attempts
1
changed
True
cmd
[
    "/var/lib/lxc/aio1-galera-container-10af3343/container-first-run.sh"
]
delta
0:00:00.034934
end
2025-12-15 09:47:51.532680
invocation
{
    "module_args": {
        "_raw_params": "/var/lib/lxc/aio1-galera-container-10af3343/container-first-run.sh",
        "_uses_shell": false,
        "argv": null,
        "chdir": null,
        "creates": "/var/lib/lxc/aio1-galera-container-10af3343/setup.complete",
        "executable": null,
        "expand_argument_vars": true,
        "removes": null,
        "stdin": null,
        "stdin_add_newline": true,
        "strip_empty_ends": true
    }
}
msg

rc
0
start
2025-12-15 09:47:51.497746
stderr
export CPID="$(lxc-info -Hpn aio1-galera-container-10af3343)"

function update_backup_resolvers {
  if [[ -e "/proc/${CPID}/root/etc/resolv.conf.setup" ]]; then
    mv /proc/${CPID}/root/etc/resolv.conf.setup /proc/${CPID}/root/etc/resolv.conf
  elif [[ -e "/proc/${CPID}/root/etc/resolv.conf" ]]; then
    cp /proc/${CPID}/root/etc/resolv.conf /proc/${CPID}/root/etc/resolv.conf.setup
  fi
}

# If the setup is complete return as the process is complete
if [[ -f "/var/lib/lxc/aio1-galera-container-10af3343/setup.complete" ]]; then
  exit 0
fi

# Backup the resolvers as the setup script is not executed within an NS.
update_backup_resolvers

# Use the host resolvers
cat /etc/resolv.conf > /proc/${CPID}/root/etc/resolv.conf

# Execute
nsenter --mount=/proc/${CPID}/ns/mnt --pid=/proc/${CPID}/ns/pid \
        --uts=/proc/${CPID}/ns/uts --ipc=/proc/${CPID}/ns/ipc \
        -- /opt/container-setup.sh

# Generate the lxc container create prep commands


# Create dir "/var/backup"
mkdir -p "/var/backup"

# Create dir "/openstack/src"
mkdir -p "/openstack/src"

# Create dir "/opt/cache/files"
mkdir -p "/opt/cache/files"


# Run extra commands
echo noop

# Restore the resolvers
update_backup_resolvers

# Mark the setup as complete
touch /var/lib/lxc/aio1-galera-container-10af3343/setup.complete
stderr_lines
[
    "",
    "export CPID=\"$(lxc-info -Hpn aio1-galera-container-10af3343)\"",
    "",
    "function update_backup_resolvers {",
    "  if [[ -e \"/proc/${CPID}/root/etc/resolv.conf.setup\" ]]; then",
    "    mv /proc/${CPID}/root/etc/resolv.conf.setup /proc/${CPID}/root/etc/resolv.conf",
    "  elif [[ -e \"/proc/${CPID}/root/etc/resolv.conf\" ]]; then",
    "    cp /proc/${CPID}/root/etc/resolv.conf /proc/${CPID}/root/etc/resolv.conf.setup",
    "  fi",
    "}",
    "",
    "# If the setup is complete return as the process is complete",
    "if [[ -f \"/var/lib/lxc/aio1-galera-container-10af3343/setup.complete\" ]]; then",
    "  exit 0",
    "fi",
    "",
    "# Backup the resolvers as the setup script is not executed within an NS.",
    "update_backup_resolvers",
    "",
    "# Use the host resolvers",
    "cat /etc/resolv.conf > /proc/${CPID}/root/etc/resolv.conf",
    "",
    "# Execute",
    "nsenter --mount=/proc/${CPID}/ns/mnt --pid=/proc/${CPID}/ns/pid \\",
    "        --uts=/proc/${CPID}/ns/uts --ipc=/proc/${CPID}/ns/ipc \\",
    "        -- /opt/container-setup.sh",
    "",
    "# Generate the lxc container create prep commands",
    "",
    "",
    "# Create dir \"/var/backup\"",
    "mkdir -p \"/var/backup\"",
    "",
    "# Create dir \"/openstack/src\"",
    "mkdir -p \"/openstack/src\"",
    "",
    "# Create dir \"/opt/cache/files\"",
    "mkdir -p \"/opt/cache/files\"",
    "",
    "",
    "# Run extra commands",
    "echo noop",
    "",
    "# Restore the resolvers",
    "update_backup_resolvers",
    "",
    "# Mark the setup as complete",
    "touch /var/lib/lxc/aio1-galera-container-10af3343/setup.complete"
]
stdout
noop
stdout_lines
[
    "noop"
]