Questions tagged [ansible]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
83 views

issue with ssh into lxd container using ansible

I have created a dynamic inventory which fetch the created lxd containers (so that I don have to type the name of container each time) so here is the dynamic inventory plugin: community.general.lxd ...
Zakaria Ait Yakoub's user avatar
0 votes
1 answer
103 views

Ubuntu Server 22.04: How to write the Ansible debconf values into Postfix configuration?

I'm trying to automate the Postfix deployment into multiple Ubuntu servers: # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 ...
Floren's user avatar
  • 141
0 votes
0 answers
59 views

Managing Linux installation on a fleet of build servers with large code workspaces

Here's what I'd like to do: Have many Linux servers for building Android Open Source Project and testing those builds using Android virtual device (either Cuttlefish or Goldfish/Emulator) Have all ...
mixermaker's user avatar
0 votes
1 answer
276 views

Unable to login to root after running ansible scripts

I am currently not able to login to my super user. Here is the sequence of events ~ su password: su: using restricted shell which zsh su: failed to execute which zsh: No such file or directory ...
Archer Heffern's user avatar
1 vote
0 answers
730 views

Permission denied (publickey) error when managing GCP machine via Ansible (running on GCP VM) despite successful SSH connection

I deployed two machines to GCP via Terraform. Let's call them control-host and target-host. I want to manage the target-host via Ansible installed on the control-host. Unfortunately, I keep getting ...
SkogensKonung's user avatar
2 votes
2 answers
11k views

git@git:~$ ansible --version ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859-1

Installing Ansible on Ubuntu Ubuntu builds are available in a PPA here. To configure the PPA on your system and install Ansible run these commands: $ sudo apt update $ sudo apt install software-...
anjireddy's user avatar
1 vote
1 answer
761 views

How would I autoinstall 22.04 from USB?

What the best way using Subquitity/Seed/Cloudinit to auto install an Ubuntu Desktop 22.04 image? Our staff use Ubuntu and rather than keeping one fat image lying about which is time consuming to ...
Definity's user avatar
  • 123
0 votes
0 answers
715 views

how to force user to change password after first login

I am trying to setup a rule that every newly created user must change his password after first login. I know it can be done manually , i.e to force users to change password at next login. chage -d 0 ...
Asif Shabbir's user avatar
0 votes
0 answers
42 views

Ansible - How to optimize sending a file to a sub-network?

I have a playbook that looks: - name: Playbook para Copiar JRE hosts: all tasks: - name: Copia Arquivo JRE copy: src: jre.tar.gz dest: /home/pdv/sistema-loja/jre-new.tar....
Thiago Sayão's user avatar
0 votes
1 answer
137 views

Install ansible 2.5 in Ubuntu server 22.04

I'd like to install Ansible 2.5 in Ubuntu 22.04, because our deployment playbook incompatible with Ansible newer version. I tried installing from apt, but ppa doesn't provide 2.5 for 22.04. Installing ...
Tien Dung Tran's user avatar
0 votes
1 answer
8k views

Anisble error: "Failed to update apt cache:..." [duplicate]

I'm working on an Ansible project in the cloud and got this error. In my config-server.yml file, this is the part where the job fails, as reported by CircleCi: pre_tasks: - name: "wait 600 ...
Dzhud's user avatar
  • 1
1 vote
0 answers
515 views

Make python3.10 as default python. Python3 is causing problems while running ansible scripts

I want to set python3.10 as default python. I want to do this because I am getting error while running ansible scripts even if the yaml files are having valid syntax. while scanning a simple key",...
Samvid's user avatar
  • 11
2 votes
2 answers
17k views

How to redirect output to a text file in bash and have it show in the terminal at the same time? [duplicate]

If I use the text re-directors > and >> they output to a text file which is fine for long term logging but, I also need them to be present on screen in the traditional Standard Input, ...
Michael's user avatar
  • 51
0 votes
1 answer
62 views

need to run a .sh script in bin file in another host through cmd

I have tried this but not working. Command that I have tried: sudo -u ec2-user ssh -i {{ sso_key_path }}@{{ sso_ip_address }} "sh sso_file.sh"
maheswari palasa's user avatar
0 votes
1 answer
913 views

How to run ansible playbook on boot on ubuntu?

I have installed Ansible on Ubuntu VM and it controls two more Ubuntu VMs. I want to run an ansible playbook when the ansible VM boots. I followed this, but it's not working for ansible playbooks. ...
Harshal's user avatar
0 votes
0 answers
313 views

Playbook cannot work and other tests are normal

Ansible is installed at Ubuntu. I want to see output of cisco command "show ip interface brief" but it cannot work with some error message as below. All hosts and playbook info are listed in ...
david y's user avatar
1 vote
1 answer
443 views

Samba Share Configured by Ansible Not Accessible

I am attempting to administer to Samba Shares' on a Ubuntu 20.04 running Samba 4.13.17-Ubuntu. I have an Ansible playbook that writes my Samba config to smb.conf and I am adding writable & ...
jordan.baucke's user avatar
0 votes
0 answers
948 views

SSH method error

I'm Hi When attempting to ssh an iLO HPE by Ansible, I receive the following error: [ip] | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host ...
sasanalem's user avatar
0 votes
0 answers
139 views

I am unable to ssh into AD domain after running devsec.hardening.ssh_hardening role

I first ran the command ansible-galaxy collection install devsec.hardening And then I ran this playbook - hosts: linux become: yes vars: - sftp_enabled: true # Enabled for Ansible. See the ...
Anvay Singh's user avatar
1 vote
1 answer
193 views

apt update issues via docker container ansible playbook

I have been trying to run an ansible playbook via a docker container, However I'm having issues with sudo apt update currently running ubuntu 18.04: I’ve also tried to SSH into each VM (which isn't ...
Anyl Pascal's user avatar
0 votes
1 answer
38 views

Why it show python missing?

Python used to work with ansible. After reinstalling ansible, it looks like python is missing. Do you think so? Thank you enter image description here enter image description here
david y's user avatar
2 votes
0 answers
51 views

What's the difference between dist-upgrade and upgrading /usr/lib/update-notifier/apt-check --package-names? [duplicate]

What is the difference between upgrading packages using the dist-upgrade and upgrading the packages from /usr/lib/update-notifier/apt-check --package-names ? The reason I'm asking is, the machine I'm ...
N. J's user avatar
  • 171
0 votes
1 answer
222 views

Ansible playbook on ubuntu 20

How to write Ansible Playbook to install different applications on different hosts on Ubuntu 20.04 Conditions When running a playbook it should ask for the host name (we must give the specific host ...
Learner's user avatar
0 votes
1 answer
707 views

rsyslog.service not found by Ansible during preseed late_command

I continually find that certain things "just don't work" when run as preseed/late_command in an Ubuntu Bionic preseed file. (The same applies to autoinstall for Ubuntu Focal.) In this ...
Brad Solomon's user avatar
2 votes
1 answer
7k views

Permission denied (publickey). while using SCP command

I have tried to copy some file in tomcat using SCP command scp ubuntu@xxxxxxx:/opt/apache-tomcat-9.0.48/conf/server.xml . ubuntu@xxxxxxx: Permission denied (publickey). help me to get out this Thank ...
AKASH-29's user avatar
2 votes
2 answers
1k views

Nested Command in sed substitution

I'm trying to used sed to find and encrypt ansible_password field in an inventory file and encrypt it with ansible-vault command. But ansible-command is failing throwing an sed error, where as a ...
Munavir Chavody's user avatar
1 vote
1 answer
1k views

Ansible to reconnect after reboot

I have a task that needs to run after a reboot. I know that checking connection can be done with wait_for_connection. I have the following draft: - name: Reboot host reboot: - name: Wait 300 ...
rogersjoshmac123's user avatar
1 vote
1 answer
398 views

Get sudoers file instantly work after reboot in Ubuntu 20.04

I'm trying to execute an ansible command as a user-level cron job which looks as follows: @reboot /home/jon/.local/bin/ansible-playbook /home/jon/deactivate.yml where deactivate.yml is doing something ...
jondon987's user avatar
0 votes
3 answers
4k views

How to noninteractively add Certificate Authority (CA) ssl certificates from script

I have an ansible play that calls a script. The script copies .crt files for my private key infrastructure in to /usr/share/ca-certificates/my.domain.tld Then the script calls: sudo update-ca-...
James T Snell's user avatar
0 votes
2 answers
2k views

Failed to find required executable brew in paths - Ansible

I installed the latest version of Ubuntu on my Windows 10 and I am trying to run a playbook: --- - name: "My first play" hosts: localhost tasks: - name: "test ...
Gentleman Slav's user avatar
1 vote
1 answer
312 views

Automation of desktop experience

I am trying to apply inside an Ansible playbook the following logic: Since: dconf read /org/gnome/shell/favorite-apps ['firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', '...
Nikolay Kostov's user avatar
0 votes
1 answer
364 views

Ansible for Juniper on Ubuntu 20.04 - interpreter error

I'm having trouble setting up my Ansible playbook to run for Juniper on Ubuntu 20.04. I works for cisco though . At this point I'm stuck at getting Python 3 to work as the interpreter. Any working ...
Okey's user avatar
  • 1
0 votes
0 answers
39 views

New to Linux Nassing and File sharing

So, I'm building my own tiny NAS. I have a question. I'd want to create a NAS (with SAMBA I'd say? OR whith Ansible NAS?), which would have plex running (and minecraft server ;)). Sometimes I'd want ...
Victoroos's user avatar
1 vote
1 answer
1k views

Install Older Ansible on Ubuntu 20.04

I have installed the latest Ansible using pip3 on Ubuntu 20.04. After that, even if I installed older Ansible version, it still sees the latest version (2.10.4 ) Here are the outputs and I'm not sure ...
redpotato's user avatar
5 votes
1 answer
4k views

Ansible: dpkg-reconfigure -plow unattended-upgrades stopped while running

Here we are trying to start auto updating packages in Ubuntu through Ansible playbook. dpkg-reconfigure -plow unattended-upgrades When we run this command manually, it shows the following prompt, ...
karan 's user avatar
  • 51
0 votes
1 answer
798 views

Ansible showing different version for root and non-root users

I need to use an older version of Ansible (2.9). I added the repo using add-apt-repository ppa:ansible/ansible-2.9. When I run ansible --version as root, I get: ansible 2.9.6 config file = /etc/...
DevOpsSauce's user avatar
1 vote
0 answers
939 views

Problem on installing Ansible on 18.04 LTS

What I did: sudo apt-add-repository ppa:ansible/ansible ; sudo apt update ; sudo apt install ansible Error message: Some packages could not be installed. This may mean that you have requested an ...
M. Rostami's user avatar
3 votes
1 answer
3k views

"[Errno 2]. No such file or directory: b'apt-get'", "rc": 2

I don't know why when I run my ansible-playbook to install packages on ec2-instances using apt-get this appears.[WARNING]: Updating cache and auto-installing missing dependency: python3-apt fatal: [...
demetri's user avatar
  • 31
2 votes
2 answers
1k views

How can I use Ansible to claim that I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer? lists some ways to achieve this (GUI, script, puppet config). But I am at loss how to handle echo ttf-mscorefonts-installer ...
reducing activity's user avatar
1 vote
1 answer
1k views

Reinstall GRUB on second disk's EFI partition from running system

I am trying to do something like this: How can I reinstall GRUB to the EFI partition? However, I don't see how I can run chroot because it's an automated process (with Ansible, but that shouldn't ...
godfool's user avatar
  • 21
5 votes
1 answer
19k views

ansible: How to avoid warnings

I am using ansible for monitoring my home computing net, which consists several Linux machines (x64 and Raspberries). How can I avoid warnings from every Raspberry client? [WARNING]: Platform linux ...
Pascal Klein's user avatar
0 votes
0 answers
3k views

How to solve "No package matching 'docker-ce' is available"

I'm using Ubuntu 18.04 with Google Cloud Platform. I'm trying to install docker on my worker machine through my master machine but it keeps giving me the same error. [DEPRECATION WARNING]: Invoking &...
frank din's user avatar
0 votes
1 answer
2k views

How do I fix my ansible playbook

I'm using Ubuntu 18 on GCP and I'm trying to install the chromium browser on my worker from my master node. The playbook that I wrote successfully installed java, and git, on my worker node but I get ...
frank din's user avatar
0 votes
1 answer
5k views

How resolve WARN when run ansible: [WARNING]: Skipping plugin as it seems to be invalid?

When I run ansible command, like this: ansible -i host all -m ping I got this warnings: [WARNING]: Skipping plugin (/usr/lib/python2.7/dist-packages/ansible/plugins/callback/foreman.py) as it seems ...
Sergey's user avatar
  • 33
1 vote
1 answer
106 views

Need help with ansible

I have ansible project that automatically installs Patroni HA cluster. Problem is in patroni.conf file. It needs different configuration for every host. For example: Host 1 configuration: scope: ...
Nam Pizda's user avatar
0 votes
1 answer
315 views

WSL version 1 Unable to run ansible, module missing

I'm trying to run an Ansible playbook in Ubuntu 18.04.1 under version 1 of the Windows Subsystem for Linux (Windows 10 ver 10.0.18363.751), but I keep getting the error: ImportError: No module named ...
Conrad C's user avatar
  • 101
2 votes
0 answers
2k views

Dependencies problem when installing ansible in ubuntu 18.04

I try to reinstall ansible in my ubuntu18.04 laptop. I've got this dependencies problem : $ LANG=C sudo apt-get install ansible Reading package lists... Done Building dependency tree Reading ...
Cedricici's user avatar
2 votes
2 answers
4k views

How to connect Ansible to AWS-EC2 via ssh

I want to connect ansible to EC2 via ssh. I created a key pair on my local machine(ubuntu) and copied it to my EC2 instances using ssh-copy-id. The copy was successful, but I get the error below when ...
user1048281's user avatar