Questions tagged [linux]

Linux is the generic term for a UNIX-like open source operating system based on the Linux kernel. Use this tag for questions about DevOps practices, processes and tools in Linux environments.

Filter by
Sorted by
Tagged with
2
votes
1answer
34 views

Ansible - Variable expansion inside hostvars declaration?

I have a hardcoded hostvars line, like so: node1_hostname={{ hostvars['192.168.0.162']['node1_hostname'] }} I have a set_fact variable from a previous play that I'd like to expand in the host section ...
0
votes
0answers
22 views

Building the rpm package in teamcity and installing the packages required to build this

I'm new to building RPMs . I need to build a source code from github and that is throwing missing header file systemd/sd-journal.h: No such file or directory . For this, I found on one of the github ...
1
vote
1answer
88 views

Failed to install kubernetes on centos

Following the official documentation, I have an error when trying to install kubernetes cluster yum package. I am on Centos 7 using yum. So I run this commands: cat <<EOF | sudo tee /etc/yum....
0
votes
0answers
27 views

Permissions on jenkins server

I have a couple of users on jenkins server - ec2-user and jenkins I ssh on the jenkins box as ec2-user For some reasons, we have dependencies on jenkins accessing a file in /home/ec2-user/.local/lib/...
0
votes
0answers
16 views

How to install ping or telnet on ChromeOS (GCP VMs)

I am on GCP and neither ping nor telnet are installed on what appears to be a Linux flavor called ChromeOS. I am really disappointed to see basically zero hits on internet search for this issue of ...
0
votes
0answers
24 views

deploying my public key to multiple ec2 instances

I wrote a playbook to deploy my ssh keys across multiple instances. This my playbook, but I am experiencing some problems with it. I already created my ssh keys from my local instance. Please see ...
3
votes
1answer
649 views

Ansible: register variable with loop

What’s the best way to use registered variable ‘audit_tools’ to check if all items are own by root ? Do I need to use Jinja2 filter or something ? Thanks - name: Verify audit tools are own by root ...
0
votes
1answer
69 views

Ansible No such file or directory error message for any executable in Amazon Linux AMI

I'm trying to run this command in a Amazon Linux AMI instance - name: Run docker shell: systemctl enable docker && systemctl start docker And receiving this error message "stderr&...
0
votes
1answer
39 views

any way to limit “docker logs” output by default?

Context* I forgot to pass the "--tail" options to the "docker logs" command when inspecting a running container. The affected container dumps tens of millions of logs. The command ...
0
votes
0answers
20 views

Gitlab CI invokes docker install.sh and always runs instruction with Sudo

I am trying to run gitlab ci which contains custom php image. The before_script invokes docker_install.sh In docker_isntall.sh I executed "whoami" it gives "docker". I tried to ...
0
votes
0answers
63 views

How to use jenkins build parameter in web ui?

I have a ready jenkins build parameters , I want to use/link the same in webpage UI (that to be created). Need help on - what are various possible way to achieve this ? any document , link would be ...
2
votes
0answers
30 views

Is running linux container on windows aws instance possible?

what I'm trying to achieve is running a Linux(ubuntu LST) container inside a windows server 2019 OS. The problem is that the windows OS runs as an AWS instance. There have been problem for me trying ...
0
votes
2answers
363 views

Can I upgrade a docker image/container from buntu 18.04 to ubuntu 20.04?

I have a host ubuntu 20.04 running my software on docker with a container derivated from ubuntu 18.04. I would like to use ubuntu 20.04 for several reasons (like the better software on 20.04). If I ...
1
vote
0answers
261 views

Ansible/AWS dynamic inventory — How to create groups based on tags?

I am trying to create custom groups, based on tags. I am using this doc as a reference: https://docs.ansible.com/ansible/latest/plugins/inventory.html#inventory-plugins As a baseline, in my aws_ec2....
0
votes
0answers
38 views

Docker container with Ubuntu 16.04, Nginx, Nodejs via docker-compose.yml

I am new to Docker Containers. But I am very confused with a few things. My goal is to create docker container with ubuntu 16.04,Nginx and nodejs. From googling and tururials I only found docker-...
2
votes
1answer
34 views

How do I convert “\n” to linebreaks in my docker logs?

I am using docker-compose up to start a web server in linux but am finding that the stdout is printing "\n" characters instead of creating new lines. This makes stack traces difficult to ...
0
votes
2answers
169 views

How to Save and Restore the Iptables rule and configuration from file?

I want to save the current iptables configuration to a file and restore it from a file. I have a lot of rules and modifying the rules really hard for me. So, how can i do that?!
2
votes
1answer
1k views

GitHub Actions Runner execute commands with sudo GitHub Actions

I have a GitHub action set on self hosted Ubuntu VPS on Linode. I ran sudo ./svc.sh install and then ./svc.sh start. The runner is up and working but I have a command in my yaml file that needs to run ...
2
votes
0answers
383 views

Remote connection from Docker container by FTP

I built my docker image and run it: docker run --rm -P -d test:latest Then I entered the command and opened connection: ftp open XXX I successfully connected and entered user data. After that I ...
3
votes
1answer
61 views

Porting a docker container to a different Linux host OS

I'm new to Docker. I have looked at many tutorials, however, this is still not clear to me : For example, If I create a docker image on a system which is using Ubuntu as the host OS. Can I then later ...
0
votes
1answer
46 views

What are the daily job duties of a devops? [duplicate]

I have been working for linux management over 10 years. In the last 5 years, I have added a lot of coding experience through software development like php, ruby, go, etc. I wanna be a devops, but I ...
1
vote
2answers
210 views

How to sync two directories on same host using Ansible?

I am using the below playbook for mounting partitions on another EBS volumes while provisioning instance on AWS --- - name: Mounting necessary partitions hosts: localhost become: ...
0
votes
1answer
254 views

How comes a GitLab CI/CD job cant' find its artifacts?

In the Open Source ventilator project, we aim to provide those who focus on testing with a ready-to-go flash file for the Arduino controller board. While the binaries seem to be there, for some ...
1
vote
1answer
19 views

How do I package a jar and a Linux VM to run in Windows? [closed]

I'm new to DevOps so please forgive my ignorance. I have inherited a Win10 Java app that is currently run by pressing play in NetBeans. It makes API calls to a server running in a Linux VM. What I'd ...
0
votes
1answer
490 views

What is the difference between a jail environment in linux and docker container?

I am curious about difference between a jail environment in linux and Docker. What separates these two technologies?
2
votes
0answers
44 views

SFTP server with third party user management system?

I understand how to set up SFTP servers on Linux and create users and their passwords manually. So basically, the users get authenticated as normal Linux users get authenticated through /etc/passwd. ...
0
votes
1answer
104 views

Which Jenkins file is responsible for Enable cache setting

I want to know how can I modify the below setting from Jenkins server and not UI: http://XXXXX:YYYYY/configureSecurity/
0
votes
2answers
50 views

How to run Ansible command to update imunify360 settings

How can I use Ansible to run the following CloudLinux Imunify360 commands properly on CloudLinux 7 (similar to CentOS7)? I tried different ways to "escape" the colons in the commands and it doesn't ...
1
vote
0answers
47 views

How to get alert for LDAP issues

I want to run some script which checks for LDAP issue, and in case it found something, it sent me alert. I thought using ssh command with some generic user, but I'm not sure what is the response I'm ...
4
votes
1answer
1k views

Running a command as a specific user on an ec2 using ssm

Background I want to automatically configure an EC2 via a build, using the aws cli and ssm. The (manual) setup for the container looks something like this: Create an EC2 Run a shell script as root ...
2
votes
1answer
3k views

how to prevent Ansible from showing output on screen?

I have this in my playbook which execute a command on remote server and enters its log on local server. - name: run script shell: runuser -l testuser -c "/tmp/test.sh" register: myshell_output ...
1
vote
1answer
542 views

How to determine which packaged pip to install in order to run the Ansible pip module?

I am struggling to find a reasonable method to detect which of python-pip or python3-pip I should install depending on the contents of the ansible_python fact. This is on Debian and Ubuntu. Looking ...
0
votes
1answer
29 views

Where is Puppet's enviroments directory on Amazon Linux2?

I am using Puppet version 3.8.7 on Amazon Linux2, trying to find the directory containing the Puppet environments. I tried to find it with the find command looking for files named "production" or ...
1
vote
1answer
27 views

Is there a way to clone an ec2 from inside the ec2 terminal?

I want to be able to back up my linux accadamy lab servers but they don't provide a way to to this. I'm wondering if it's posible to clone my EC2 lab server from inside the EC2 to get round this?
2
votes
1answer
3k views

Consul: how to remove dead client nodes quickly

Background: When running Consul client-mode in AWS, EC2s are constantly getting replaced, which results in a lot of dead client nodes when looking at the Consul UI or via consul members. Already ...
3
votes
1answer
1k views

Azure DevOps Artifact.zip folder structure for .NET Core 3.0 application

I have an ASP.NET Core 3.0 application for which I have a full CI/CD setup in Azure DevOps. The Application is hosted on a Ubuntu 18.04 server machine. In the Build Pipeline, the solution is built ...
0
votes
1answer
72 views

PowerShell command to automate Azure Linux VM [closed]

I am looking for some PowerShell command which can check if any update/patch need to be applied to existing Azure Linux VM and then apply the patch if required. I will then use this PowerShell ...
0
votes
1answer
46 views

Run command from Jenkins to Linux Server

I have a HAProxy server setup in Azure Linux Machine. How can I run a HAProxy start/stop command from Jenkins to multiple Linux server?
2
votes
1answer
351 views

How to resolve the dependencies while installing locally downloaded packages?

I have simple playbook where trying to install the Debian packages downloaded locally in my server. This playbook runs on localhost and install the Debian packages in the same system. But this ...
1
vote
1answer
152 views

Create User Using Ansible with Authenticate Pem File

Community, I am creating a user on the client machine using Ansible but the issue is it creates a user and add authenticate file but getting an error while SSH to that machine using created, User. ...
1
vote
2answers
936 views

Ansible resetting swap linux

I am newbie to Ansible, i failed using ansible via command that way : ansible host -a "/sbin/swapoff -a && /sbin/swapon -a" Only this worked ansible host -a "/sbin/swapoff -a ansible host ...
2
votes
0answers
36 views

Issue building deb package using Docker/Windows

I am trying to create a way for our developers to be able to build deb packages from their Windows machines. We would like to reuse what we have for *nix so I've written a few batch scripts which are ...
0
votes
2answers
13 views

How to analyze the file activities due to process?

I need to analyze the file i/o operations caused due to a process. So I would like to know, which all files are affected by this program. Is there a tool for this particular use case?. One of our ...
8
votes
4answers
12k views

Docker compose volume syntax valid for Windows and Linux

We have developers working on an app using both Windows and Linux. The application is built within a Docker container, and ships a docker-compose specification for the build environment. The local ...
1
vote
2answers
4k views

using copy module with wildcards

I need to copy a database backup file from a primary server to a standby server. Since I can't use synchronize, I was following this method: copy file to local ansible server from primary, then, copy ...
2
votes
2answers
85 views

reboot server during Ansible tasks

I have 3 scripts that must be run on server one by one. for example: - name: find config shell: /data/scripts/config1 become: yes become_user: root tags: find_config - name: change config ...
0
votes
2answers
724 views

copy contents of file on ansible server to another file on remote servers

I have a bash script on about 70 severs in /opt/zservice/etc/config that i want to change its content with ansible. the new content is on ansible server in this path /data/new_config. how i can use ...
1
vote
2answers
67 views

Which Users Should I Create With Terraform And Which With Ansible?

I am creating some Ubuntu VMs in Azure with Terraform. I am then configuring the VMs with ansible. When terraform creates the VM it creates an admin user resource "azurerm_virtual_machine" "main" { ...
2
votes
1answer
294 views

Azure Security Center with Ubuntu 19

Has anyone successfully gotten the Azure Security Center agent to work with Ubuntu 19? My omsconfig.log is full of messages like This event indicates that failure happens when LCM is trying to get ...
0
votes
2answers
92 views

What is the most common server permission policy for web application deployment?

I have a server with Ubuntu with a web server (Apache or Nginx) running a PHP application. The application consists of the following parts: An executable code that handles HTTP requests (say in the /...